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

mpopenapi endpoint updates #7104

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.