Good news. Many thanks for the quick feedback!
On 27/01/2022 16:57, Bas Vanmeulebrouk wrote:
Dear Karen,
I have tested the latest 2.15.0 snapshot and I can confirm this is now working
as expected. I have created two demonstration projects with a simple API, one
using the camel-openapi-java and one using camel-openapi-java-starter. Both
generate the proper paths in the OpenAPI specification document. When you load
this document in for instance Swagger UI, the proper paths are generated and
the requests work as expected. That hags are also correct.
Kind regards,
Bas.
-----Original Message-----
From: Karen Lease <karenlease...@gmail.com>
Sent: Tuesday, January 25, 2022 5:46 PM
To: users@camel.apache.org
Subject: Re: Generated paths in camel-open-api-java 3.14.0
Dear Bas,
The change has been committed in the main branch of the repository
(3.15.0-SNAPSHOT) if you want to test it. Only the camel-openapi-java component
is changed. It works well with the rest-openapi example in
camel-spring-boot-examples.
But if you are using springdoc, then you should use the workaround described in
CAMEL-17139; otherwise the spring generated server URL doesn't include the
camel context-path. I'll fix this shortly but it may not make it into 3.15.
Karen
On 20/01/2022 13:41, Bas Vanmeulebrouk wrote:
Dear Karen and Claus,
Thank you very much for looking into this. We are using the camel-openapi-java
component. We are setting the context path via the
camel.servlet.mapping.context-path property in application.properties. If you
let me know when the change has been submitted I can test. I can create a
Spring Boot app using the starter as well.
Kind regards,
Bas Vanmeulebrouk.
-----Original Message-----
From: Karen Lease <karenlease...@gmail.com>
Sent: Wednesday, January 19, 2022 3:51 PM
To: users@camel.apache.org
Subject: Re: Generated paths in camel-open-api-java 3.14.0
Hi Bas,
I'm working on the fixes Claus mentioned and will commit a PR soon which will
remove the context path from the api paths.
But this has some side effects on the related camel-springboot starter
components which I also need to address.
Are you using camel-springdoc-starter or camel-openapi-java-starter, or
directly using the camel-openapi-java component in your springboot application?
If you're using one of the camel springboot starters, I'm curious how you've
specified the context-path property in your application because those starters
are not currently using the server URL generated by the Camel openapi-java
component.
Thanks,
Karen Lease
On 19/01/2022 14:49, Claus Ibsen wrote:
Hi
There are some JIRAs and fixes on the way, so try 3.14.1 when its
released, or 3.15.0, or try the SNAPSHOT builds and help test.
On Wed, Jan 19, 2022 at 1:48 PM Bas Vanmeulebrouk <b...@civity.nl> wrote:
Dear list,
We have got a Spring Boot application which uses a Camel servlet running on a
specific context path. Camel-open-api-java is used to generate the OpenAPI
documentation for our API. We are upgrading this application from Camel 3.11.5
to 3.14.0. As described in the migration guide
(https://camel.apache.org/manual/camel-3x-upgrade-guide-3_13.html#_camel_openapi_java_camel_swagger_java),
the context path is now being added to the base path for all API calls. Since
this context path is added to the list of server URL's as well, tools to
generate client code based on our OpenAPI document try to access our API via a
URL with a duplicated context path, for example
http://localhost:8080/my-context-path/my-context-path/api/do-something. Any
ideas what we are missing? Is there an option to prevent this from happening?
Kind regards,
Bas Vanmeulebrouk,
Civity,
Handelsweg 6,
3707 NH Zeist,
the Netherlands,
www.civity.nl,
b...@civity.nl.