Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Unknown
Description
This looks a bit mysterious as restConfiguration has `useXForwardHeaders=true` as default which causes the url to be empty or just the base path (but you can have / as base-path)
{ "openapi" : "3.0.0", "info" : { }, "servers" : [ { "url" : "" } ], "paths" : { "/account" : { "get" : { "operationId" : "get-c5d3", "responses" : { "200" : { "description" : "Output type", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Account" } } } } } } } }, "components" : { "schemas" : { "Account" : { "type" : "object", "properties" : { "accountNumber" : { "type" : "string" }, "accountName" : { "type" : "string" }, "balance" : { "type" : "number", "format" : "double" } } } } } }
Notice how the server urls is "" (empty).
But the server url has been computed to http://0.0.0.0:8080 by default prior to setupXForwardedHeaders is invoked.
I am not sure why this line is as-is
https://github.com/apache/camel/blob/f234dae17fa1c6090e13ffd898c8287bf149b57f/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiSupport.java#L136
Attachments
Attachments
Issue Links
- duplicates
-
CAMEL-19925 openapi-java not showing full url server
- Resolved
- relates to
-
CAMEL-20487 REST API generator issue with typeOut
- Resolved
-
CAMEL-20488 camel-openapi-java - Drop support for openapi v2
- Resolved
-
CAMEL-20489 camel-openapi-java - Rest configuration for servers
- Resolved
- links to