[
https://issues.apache.org/jira/browse/CAMEL-17151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17436430#comment-17436430
]
Claus Ibsen commented on CAMEL-17151:
-------------------------------------
[~Steve973] - If you run the example you have that double slash problem.
If you have some time to invest then you are welcome, its likely in the
camel-openapi-java module where it builds up the api model. And you have this
problem when using camel-servlet and how those leading context-path is defined.
When you found the spot its likely an easy fix, to just check if there are
double slashes and remove on of them.
In the Rest DSL you can also workaround by removing the leading slash
rest("/users").description("User REST service")
.consumes("application/json")
.produces("application/json")
Change to
rest("users").description("User REST service")
.consumes("application/json")
.produces("application/json")
But its a common practice to start with a slash in the rest-dsl
> camel-openapi-java - Double slashes in api-doc
> ----------------------------------------------
>
> Key: CAMEL-17151
> URL: https://issues.apache.org/jira/browse/CAMEL-17151
> Project: Camel
> Issue Type: Bug
> Components: camel-openapi-java
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 3.13.0
>
>
> ~/workspace ❯ curl http://localhost:8080/api/api-doc/
>
> ✘ INT
> {
> "openapi" : "3.0.2",
> "info" : {
> "title" : "User API",
> "version" : "1.0.0"
> },
> "servers" : [ {
> "url" : "/api"
> } ],
> "paths" : {
> "/api//users" : {
> "get" : {
> "tags" : [ "/api//users/users" ],
> "responses" : {
> "200" : {
> "content" : {
> "application/json" : {
> "schema" : {
> "type" : "array",
> "items" : {
> "$ref" : "#/components/schemas/User"
> }
> }
> }
> },
> "description" : "All users successfully returned"
> }
> },
> "operationId" : "verb1",
> "summary" : "Find all users"
> }
> },
> "/api//users/{id}" : {
> "get" : {
> "tags" : [ "/api//users/users" ],
--
This message was sent by Atlassian Jira
(v8.3.4#803005)