From a51febd5a0977497a9472e4c1be88a5d35c60ff5 Mon Sep 17 00:00:00 2001 From: David Mueller Date: Tue, 28 Nov 2023 10:17:12 -0500 Subject: [PATCH 1/2] Add endpoint example #7068 --- .../pages/feature/mpOpenAPI-3.1/examples.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/reference/pages/feature/mpOpenAPI-3.1/examples.adoc b/modules/reference/pages/feature/mpOpenAPI-3.1/examples.adoc index 222ae3fed3..1a23a5e27e 100644 --- a/modules/reference/pages/feature/mpOpenAPI-3.1/examples.adoc +++ b/modules/reference/pages/feature/mpOpenAPI-3.1/examples.adoc @@ -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 `:/openapi` endpoint and a user interface for browsing this documentation is served from the `:/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] +---- + +---- + +When the `uiPath` attribute is not set, it defaults to the value of the `docPath` attribute with `/ui` appended. From b86edcf628bb53178b73f5c0c8ccea4de8bcabc3 Mon Sep 17 00:00:00 2001 From: David Mueller Date: Wed, 29 Nov 2023 11:19:48 -0500 Subject: [PATCH 2/2] apply example to all feature versions #7068 --- .../pages/feature/mpOpenAPI-3.1/examples.adoc | 13 ------------- .../pages/feature/mpOpenAPI/examples.adoc | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 modules/reference/pages/feature/mpOpenAPI/examples.adoc diff --git a/modules/reference/pages/feature/mpOpenAPI-3.1/examples.adoc b/modules/reference/pages/feature/mpOpenAPI-3.1/examples.adoc index 1a23a5e27e..222ae3fed3 100644 --- a/modules/reference/pages/feature/mpOpenAPI-3.1/examples.adoc +++ b/modules/reference/pages/feature/mpOpenAPI-3.1/examples.adoc @@ -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 `:/openapi` endpoint and a user interface for browsing this documentation is served from the `:/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] ----- - ----- - -When the `uiPath` attribute is not set, it defaults to the value of the `docPath` attribute with `/ui` appended. 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.