You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Tomek (Jira)" <ji...@apache.org> on 2021/11/02 07:38:00 UTC
[jira] [Updated] (CAMEL-17139) camel-openapi-java ignores
server.servlet.context-path when generating api doc
[ https://issues.apache.org/jira/browse/CAMEL-17139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomek updated CAMEL-17139:
--------------------------
Attachment: camel-openapi.zip
> camel-openapi-java ignores server.servlet.context-path when generating api doc
> ------------------------------------------------------------------------------
>
> Key: CAMEL-17139
> URL: https://issues.apache.org/jira/browse/CAMEL-17139
> Project: Camel
> Issue Type: Bug
> Components: camel-openapi-java
> Affects Versions: 3.11.3
> Reporter: Tomek
> Priority: Minor
> Attachments: camel-openapi.zip
>
>
> In my configuration I have defined both server.servlet.context-path and camel.rest.context-path properties. Part of my application.yml file:
> {code:java}
> server:
> port: 8080
> servlet:
> context-path: /camel
> camel:
> rest:
> component: servlet
> context-path: /api
> binding-mode: json
> data-format-property: { prettyPrint: "true" }
> api-context-path: /api-doc
> api-component: openapi
> api-property: { api.title: "Camel Component API",
> api.version: "1.0.0",
> api.cors: "true" }
> api-vendor-extension: false
> servlet:
> mapping:
> context-path: ${camel.rest.context-path}/*
> {code}
> I've checked the generated api-doc YAML and the servers/url objects contains invalid entries, for exampe:
> {code:java}
> "servers" : [ {
> "url" : "/api"
> } ],
> {code}
> instead of
> {code:java}
> "servers" : [ {
> "url" : "/camel/api"
> } ],
> {code}
> This causes issues when using Swagger UI - all endpoint URLs are invalid and I can't use the "Try it out" functionality for my services.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)