This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch 3.15.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/3.15.x by this push:
     new af74254761 Add note about HTTP endpoint paths when using rest-openapi 
contract first
af74254761 is described below

commit af742547616fc3ff6645315d29a4be4a24377fc6
Author: James Netherton <[email protected]>
AuthorDate: Wed May 14 07:55:00 2025 +0100

    Add note about HTTP endpoint paths when using rest-openapi contract first
    
    Fixes #7074
---
 .../ROOT/pages/reference/extensions/rest-openapi.adoc        | 12 ++++++++++++
 extensions/rest-openapi/runtime/src/main/doc/usage.adoc      | 12 ++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/docs/modules/ROOT/pages/reference/extensions/rest-openapi.adoc 
b/docs/modules/ROOT/pages/reference/extensions/rest-openapi.adoc
index 00a36119c2..7d2d7f86d8 100644
--- a/docs/modules/ROOT/pages/reference/extensions/rest-openapi.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/rest-openapi.adoc
@@ -126,6 +126,18 @@ When running in the native mode, the contract files must 
be specified the `quark
 quarkus.native.resources.includes=contract.json
 ----
 
+[IMPORTANT]
+====
+It's recommended to configure a base path under which your REST service 
endpoints will be accessible.
+
+Using the default path `/` can result in other HTTP endpoints already hosted 
under that path being inaccessible.
+
+To set a base path, do any one of the following.
+
+* Add 
https://swagger.io/docs/specification/v3_0/api-host-and-base-path/[servers 
configuration] into your OpenAPI spec file.
+* Add configuration to `application.properties` like 
`camel.component.rest-openapi.basePath=/api/v1`.
+* Set a context path on the REST DSL configuration like 
`restConfiguration().contextPath("/api/v1")`.
+====
 
 
 [id="extensions-rest-openapi-additional-camel-quarkus-configuration"]
diff --git a/extensions/rest-openapi/runtime/src/main/doc/usage.adoc 
b/extensions/rest-openapi/runtime/src/main/doc/usage.adoc
index 63e99a7566..868bb11704 100644
--- a/extensions/rest-openapi/runtime/src/main/doc/usage.adoc
+++ b/extensions/rest-openapi/runtime/src/main/doc/usage.adoc
@@ -75,3 +75,15 @@ When running in the native mode, the contract files must be 
specified the `quark
 quarkus.native.resources.includes=contract.json
 ----
 
+[IMPORTANT]
+====
+It's recommended to configure a base path under which your REST service 
endpoints will be accessible.
+
+Using the default path `/` can result in other HTTP endpoints already hosted 
under that path being inaccessible.
+
+To set a base path, do any one of the following.
+
+* Add 
https://swagger.io/docs/specification/v3_0/api-host-and-base-path/[servers 
configuration] into your OpenAPI spec file.
+* Add configuration to `application.properties` like 
`camel.component.rest-openapi.basePath=/api/v1`.
+* Set a context path on the REST DSL configuration like 
`restConfiguration().contextPath("/api/v1")`.
+====

Reply via email to