You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jpeschke <pe...@etone.de> on 2016/09/23 12:59:29 UTC

Swagger integration shows "no content" (Camel 2.16.3)

Hi,
I just migrated my application to Camel 2.16.3 (previously 2.14.3).

After some adjustments, everyhing works finde except the Swagger
Integration.
Whenever I call the swagger URL, I get HTTP-Response 204 (No Content). I
enabled both the CORS filter in the REST API AND the Swagger-Servlet...but
that doesn't help.
The REST service itself works.

My configuration in web.xml:


And in the REST routes, I did something like this:



What am I missing?

Joerg




--
View this message in context: http://camel.465427.n5.nabble.com/Swagger-integration-shows-no-content-Camel-2-16-3-tp5787962.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Swagger integration shows "no content" (Camel 2.16.3)

Posted by jpeschke <pe...@etone.de>.
Hello,
Well sometimes, the devil is in the detail.

As I found out, Swagger worked from the beginning. The only problem was that
while serving the Swagger docs under 

"http://<host>:<port>/<context-path>/api-docs/" 

in Camel 2.14 (with the old Scala-based Swagger servlet)

it seems that the swagger servlet puts it here:

"http://<host>:<port>/<context-path>/api-docs"

(without the trailing slash).
Even if you configure the "api.path" to something like "api-docs/", it still
uses the URL without(!) the trailing slash.

So the whole time, I tested with a wrong url :)


Note:
Unlinke the parameter "api.path", the parameter "base.path" needs a trailing
slash, not like the one I configured above, so it's actually






--
View this message in context: http://camel.465427.n5.nabble.com/Swagger-integration-shows-no-content-Camel-2-16-3-tp5787962p5787974.html
Sent from the Camel - Users mailing list archive at Nabble.com.