Skip to content

Commit

Permalink
apply example to all feature versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dmuelle committed Nov 29, 2023
1 parent a51febd commit b86edcf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
13 changes: 0 additions & 13 deletions modules/reference/pages/feature/mpOpenAPI-3.1/examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,3 @@ mp.openapi.extensions.liberty.merged.info=
* The `mp.openapi.extensions.liberty.merged.info` property sets the `info` section for the final OpenAPI document, which documents web modules 1, 2, and 4.

For more information, see xref:ROOT:documentation-openapi.adoc#multi-module[Multiple application and multi-module application support with MicroProfile OpenAPI]

=== Configure MicroProfile OpenAPI documentation endpoints

MicroProfile OpenAPI generates and serves OpenAPI documentation for Jakarta RESTful Services (formerly JAX-RS) applications that are deployed to the Open Liberty runtime. The OpenAPI documentation is served from the `<host>:<port>/openapi` endpoint and a user interface for browsing this documentation is served from the `<host>:<port>/openapi/ui` endpoint.

In MicroProfile OpenAPI 3.1 and later, you can configure the paths for these endpoints. Specify the `docPath` and `uiPath` attributes for the `mpOpenAPI` element in your `server.xml` file. For example, the following configuration sets the OpenAPI documentation for an `appA` application to `/appA/openapi`, while the UI to browse that documentation is available at `/appA/openapi/docUi`:

[source:xml]
----
<mpOpenAPI docPath="/appA/openapi" uiPath="/appA/openapi/docUi" />
----

When the `uiPath` attribute is not set, it defaults to the value of the `docPath` attribute with `/ui` appended.
15 changes: 15 additions & 0 deletions modules/reference/pages/feature/mpOpenAPI/examples.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

== Examples

=== Configure MicroProfile OpenAPI documentation endpoints

MicroProfile OpenAPI generates and serves OpenAPI documentation for Jakarta RESTful Services or JAX-RS applications that are deployed to the Open Liberty runtime. The OpenAPI documentation is served from the `<host>:<port>/openapi` endpoint and a user interface for browsing this documentation is served from the `<host>:<port>/openapi/ui` endpoint.

You can configure the paths for these endpoints. Specify the `docPath` and `uiPath` attributes for the `mpOpenAPI` element in your `server.xml` file. For example, the following configuration sets the OpenAPI documentation for an `appA` application to `/appA/openapi`, while the UI to browse that documentation is available at `/appA/openapi/docUi`:

[source:xml]
----
<mpOpenAPI docPath="/appA/openapi" uiPath="/appA/openapi/docUi" />
----

When the `uiPath` attribute is not set, it defaults to the value of the `docPath` attribute with `/ui` appended.

0 comments on commit b86edcf

Please sign in to comment.