Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Information Provided
-
3.20.5
-
None
-
None
-
Apache Camel : 3.20.5
SpringBoot: 2.7.12
JBoss Eap 7.4
-
Unknown
Description
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:
{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "title" }, "host": "localhost:8080", "basePath": "/root-context/api", "schemes": [ "http", "https" ], "paths": { ....}
While In OpenAPI:
{ "openapi": "3.0.2", "info": { "title": "title", "version": "1.0.0" }, "servers": [ { "url": "/root-context/api" } ], "paths": { .... }
Rest Cofiguration:
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"); }
Attachments
Issue Links
- is duplicated by
-
CAMEL-20490 camel-openapi-java - Empty server url due to X-Forward-Headers
- Resolved