Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FISH-6298 (P6) Yaml result added with the explanation about 'endpoints' #120

Merged
merged 1 commit into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,113 @@ import org.eclipse.microprofile.openapi.annotations.Operation;
}
----

Here's an example of how the OpenAPI document of a sample application would look like::
[source, yml]
----
openapi: 3.0.0
info:
title: A Test Application
version: "1.0"
servers:
- url: http://localhost:8080/openapi-example-1.0
description: Default Server.
- url: https://localhost:8181/openapi-example-1.0
description: Default Server.
paths:
/api/hello:
get:
operationId: hello-world
responses:
default:
content:
text/plain:
schema:
type: string
description: Default Response.
deprecated: false
endpoints:
/openapi-example-1.0:
- /api/hello
components: {}
----

[[deployed-endpoints]]
==== Deployed Endpoints

When more than one application is deployed, a merge is done in the OpenAPI document. The resulting document will contain all application and path definitions present. To improve the its readability, an `endpoints` attribute which lists all deployed endpoints grouped by their application context roots has been added to the document.

NOTE: The `endpoints` attribute is an proprietary Payara Platform extension and it's not portable.

The following example shows an OpenAPI document generated when 2 different applications are deployed::
[source, yml]
----
openapi: 3.0.0
info:
title: Deployed Resources
version: 1.0.0
servers:
- url: http://localhost:8080/ClusteredSingleton
description: Default Server.
- url: https://localhost:8181/ClusteredSingleton
description: Default Server.
- url: http://localhost:8080/SimpleWAR
description: Default Server.
- url: https://localhost:8181/SimpleWAR
description: Default Server.
paths:
/resources/javaee8:
get:
operationId: ping
responses:
default:
content:
'*/*':
schema:
type: object
description: Default Response.
/resources/randomNumberGen:
get:
operationId: randomNumberGen
responses:
default:
content:
'*/*':
schema:
type: integer
description: Default Response.
/rest/request:
get:
operationId: getXml
responses:
default:
content:
text/plain:
schema:
type: string
description: Default Response.
put:
operationId: putXml
requestBody:
content:
application/xml:
schema:
type: string
responses:
default:
content:
'*/*':
schema:
type: object
description: Default Response.
endpoints:
/ClusteredSingleton:
- /resources/javaee8
- /resources/randomNumberGen
/SimpleWAR:
- /rest/request
components: {}
----

[[openApi-configuration]]
== OpenAPI Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,113 @@ import org.eclipse.microprofile.openapi.annotations.Operation;
}
----

Here's an example of how the OpenAPI document of a sample application would look like::
[source, yml]
----
openapi: 3.0.0
info:
title: A Test Application
version: "1.0"
servers:
- url: http://localhost:8080/openapi-example-1.0
description: Default Server.
- url: https://localhost:8181/openapi-example-1.0
description: Default Server.
paths:
/api/hello:
get:
operationId: hello-world
responses:
default:
content:
text/plain:
schema:
type: string
description: Default Response.
deprecated: false
endpoints:
/openapi-example-1.0:
- /api/hello
components: {}
----

[[deployed-endpoints]]
==== Deployed Endpoints

When more than one application is deployed, a merge is done in the OpenAPI document. The resulting document will contain all application and path definitions present. To improve the its readability, an `endpoints` attribute which lists all deployed endpoints grouped by their application context roots has been added to the document.

NOTE: The `endpoints` attribute is an proprietary Payara Platform extension and it's not portable.

The following example shows an OpenAPI document generated when 2 different applications are deployed::
[source, yml]
----
openapi: 3.0.0
info:
title: Deployed Resources
version: 1.0.0
servers:
- url: http://localhost:8080/ClusteredSingleton
description: Default Server.
- url: https://localhost:8181/ClusteredSingleton
description: Default Server.
- url: http://localhost:8080/SimpleWAR
description: Default Server.
- url: https://localhost:8181/SimpleWAR
description: Default Server.
paths:
/resources/javaee8:
get:
operationId: ping
responses:
default:
content:
'*/*':
schema:
type: object
description: Default Response.
/resources/randomNumberGen:
get:
operationId: randomNumberGen
responses:
default:
content:
'*/*':
schema:
type: integer
description: Default Response.
/rest/request:
get:
operationId: getXml
responses:
default:
content:
text/plain:
schema:
type: string
description: Default Response.
put:
operationId: putXml
requestBody:
content:
application/xml:
schema:
type: string
responses:
default:
content:
'*/*':
schema:
type: object
description: Default Response.
endpoints:
/ClusteredSingleton:
- /resources/javaee8
- /resources/randomNumberGen
/SimpleWAR:
- /rest/request
components: {}
----

[[openApi-configuration]]
== OpenAPI Configuration

Expand Down