diff --git a/modules/reference/pages/feature/mpOpenAPI/examples.adoc b/modules/reference/pages/feature/mpOpenAPI/examples.adoc new file mode 100644 index 0000000000..0a72738509 --- /dev/null +++ b/modules/reference/pages/feature/mpOpenAPI/examples.adoc @@ -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 `:/openapi` endpoint and a user interface for browsing this documentation is served from the `:/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] +---- + +---- + +When the `uiPath` attribute is not set, it defaults to the value of the `docPath` attribute with `/ui` appended.