Hi,

The application property worked but:

For some reason the @ApplicationScoped annotation breaks the OpenAPI UI.

If removed the swagger is displayed.

I’m at a dead end where I need to inject a bean in my router but to do that the 
@ApplicationScoped needs to be present otherwise the @Inject throws an 
Exception.

Maybe another issue, ¯\_(ツ)_/¯

/M

Den 11 apr. 2024 kl 14:12, James Netherton 
<[jamesnether...@gmail.com](mailto:Den 11 apr. 2024 kl 14:12, James Netherton 
<<a href=)> skrev:

> Hi,
>
> By default, there is no direct integration with quarkus-smallrye-openapi.
> If you want your Camel REST services to be published under /q/openapi,
> there is a configuration property to enable this:
>
> quarkus.camel.openapi.expose.enabled=true
>
> There's more information here:
>
> https://camel.apache.org/camel-quarkus/3.8.x/reference/extensions/openapi-java.html#extensions-openapi-java-usage
>
> Alternatively, the OpenAPI spec can be resolved as per normal under
> /openapi.json or /openapi.yaml:
>
> https://camel.apache.org/components/4.4.x/others/openapi-java.html#_json_or_yaml
>
> --
> James
>
> On Wed, 10 Apr 2024 at 10:11, Mikael Andersson Wigander
> <mikael.andersson.wigan...@pm.me.invalid> wrote:
>
>> Hi and thanks but the result is the same
>>
>> /M
>>
>> Den 9 apr. 2024 kl 15:53, Claudio Miranda <[clau...@claudius.com.br
>> ](mailto:Den 9 apr. 2024 kl 15:53, Claudio Miranda <<a href=)> skrev:
>>
>> > Em ter., 9 de abr. de 2024 às 13:50, Mikael Andersson Wigander
>> > <mikael.andersson.wigan...@pm.me.invalid> escreveu:
>> >>
>> >> I have a Quarkus Camel application which exposes a REST interface.
>> >> I have followed the process of adding the dependencies and created the
>> definition but I can not get anything in the Quarkus Swagger UI.
>> >
>> > you can get this example
>> > https://github.com/apache/camel-quarkus-examples/tree/main/rest-json
>> >
>> > and add the dependencies
>> > org.apache.camel.quarkus:camel-quarkus-openapi-java
>> > io.quarkus:quarkus-smallrye-openapi
>> >
>> > and curl localhost:8080/q/openapi
>> >
>> > Then you can adjust your project to the example
>> >
>> > --
>> > Claudio Miranda
>> >
>> > clau...@claudius.com.br
>> > http://www.claudius.com.br

Reply via email to