This is an automated email from the ASF dual-hosted git repository. ppalaga pushed a commit to branch 2.7.x in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit f566a492d6be0e3046845973b8a33144c54fbd7c Author: Amos Feng <zh.f...@gmail.com> AuthorDate: Fri Jun 17 14:11:24 2022 +0800 Fix #3828 to update openapi-java document (#3852) --- .../pages/reference/extensions/openapi-java.adoc | 22 ++++++++++++++++++++++ .../openapi-java/runtime/src/main/doc/usage.adoc | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/docs/modules/ROOT/pages/reference/extensions/openapi-java.adoc b/docs/modules/ROOT/pages/reference/extensions/openapi-java.adoc index bc31861e84..a5ea3d809d 100644 --- a/docs/modules/ROOT/pages/reference/extensions/openapi-java.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/openapi-java.adoc @@ -39,6 +39,28 @@ Or add the coordinates to your existing project: Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. +== Usage + +You can use this extension to expose REST DSL services to Quarkus OpenAPI. With +`quarkus-smallrye-openapi`, you can access them by `/q/openapi?format=json`. + +Refer to the https://quarkus.io/guides/openapi-swaggerui[Quarkus OpenAPI guide] for further information. + +This is an experimental feature. You can enable it by +[source, properties] +---- +quarkus.camel.openapi.expose.enabled=true +---- + +[WARNING] +==== +It's user responsibility to use `@RegisterForReflection` to register all model classes for reflection. + +It doesn't support the rest services used in `org.apache.camel.builder.LambdaRouteBuilder` right now. +Also, it can not use CDI injection in the RouteBuilder `configure()` since we get the rest definitions at build time while CDI is unavailable. +==== + + == Camel Quarkus limitations The `apiContextIdListing` configuration option is not supported. Since multiple `CamelContext`s are not supported and Quarkus applications run standalone, there diff --git a/extensions/openapi-java/runtime/src/main/doc/usage.adoc b/extensions/openapi-java/runtime/src/main/doc/usage.adoc new file mode 100644 index 0000000000..27ad50baff --- /dev/null +++ b/extensions/openapi-java/runtime/src/main/doc/usage.adoc @@ -0,0 +1,18 @@ +You can use this extension to expose REST DSL services to Quarkus OpenAPI. With +`quarkus-smallrye-openapi`, you can access them by `/q/openapi?format=json`. + +Refer to the https://quarkus.io/guides/openapi-swaggerui[Quarkus OpenAPI guide] for further information. + +This is an experimental feature. You can enable it by +[source, properties] +---- +quarkus.camel.openapi.expose.enabled=true +---- + +[WARNING] +==== +It's user responsibility to use `@RegisterForReflection` to register all model classes for reflection. + +It doesn't support the rest services used in `org.apache.camel.builder.LambdaRouteBuilder` right now. +Also, it can not use CDI injection in the RouteBuilder `configure()` since we get the rest definitions at build time while CDI is unavailable. +====