Skip to content

Commit

Permalink
Add endpoint example
Browse files Browse the repository at this point in the history
  • Loading branch information
dmuelle committed Nov 28, 2023
1 parent 339c15e commit a51febd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modules/reference/pages/feature/mpOpenAPI-3.1/examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,16 @@ 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.

0 comments on commit a51febd

Please sign in to comment.