Rami created CAMEL-19925:
----------------------------

             Summary: openapi-java not showing 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


I am trying to migrate api documentaation from Swagger2.x to OpenApi 3.

When I did the migration 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)

Reply via email to