[ https://issues.apache.org/jira/browse/CAMEL-19925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17771268#comment-17771268 ]
Karen Lease commented on CAMEL-19925: ------------------------------------- [~rami15] I think this might be due to the way the X-Forwarded-Header is handled for OpenAPI 3.0, if no X-Forwarded-Proto header is present in the request. Could you please try adding {code} .useXForwardHeaders(false){code} to your restConfiguration and see if that resolves the issue. I do think there is a bug but this might be a workaround. > openapi-java not showing full url server > ---------------------------------------- > > Key: CAMEL-19925 > URL: https://issues.apache.org/jira/browse/CAMEL-19925 > Project: Camel > Issue Type: Bug > Components: camel-openapi-java > Affects Versions: 3.20.5 > Environment: Apache Camel : 3.20.5 > SpringBoot: 2.7.12 > JBoss Eap 7.4 > Reporter: Rami > Assignee: Karen Lease > Priority: Minor > > I am trying to migrate API documentation from Swagger2.x to OpenApi 3. > The documentation works fine except the url server and scheme, in the url it > shows only the base path . > Here is the API documentation in Swagger: > > {code:java} > { > "swagger": "2.0", > "info": { > "version": "1.0.0", > "title": "title" > }, > "host": "localhost:8080", > "basePath": "/root-context/api", > "schemes": [ > "http", > "https" > ], > "paths": { > ....}{code} > > > While In OpenAPI: > > {code:java} > { > "openapi": "3.0.2", > "info": { > "title": "title", > "version": "1.0.0" > }, > "servers": [ > { > "url": "/root-context/api" > } > ], > "paths": { > .... > }{code} > > > Rest Cofiguration: > > {code:java} > restConfiguration() > .component(camelComponent) > .enableCORS(apiEnableCors) > .corsHeaderProperty("Access-Control-Allow-Methods", "POST") > .port(env.getProperty("server.port", "8080")) > .contextPath(contextPath) > .apiContextPath(apiDocsPath) > .apiProperty("schemes", "http,https") > .apiProperty("api.title", apiDocsTitle) > .apiProperty("api.version", apiDocsVersion) > .apiProperty("cors", apiEnableCors.toString()) > .bindingMode(RestBindingMode.json) > .dataFormatProperty("prettyPrint", "true"); > } > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)