You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2023/12/13 14:28:00 UTC
[jira] [Resolved] (CAMEL-19925) openapi-java not showing full url server
[ https://issues.apache.org/jira/browse/CAMEL-19925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-19925.
---------------------------------
Resolution: Information Provided
> 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)