camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Swagger validation with camel-swagger
Date Thu, 06 Oct 2016 11:18:43 GMT

So Camel provides a rest-dsl which allows to expose RESTful services in Camel.

When doing this you can also enable swagger api-doc as documentation
for your RESTful services.

This is only for expose RESTful services inside Camel. If you want to
call existing REST services from Camel then you need to use some of
the REST component like camel-cxf / restlet etc. (not rest-dsl).

Now in Camel 2.18 we have a new rest component you can configure with
a swagger api, and then it will validate that the message you are
about to send from Camel to the existing REST service is valid
according to the swagger doc. It can also do some pre-validation at
startup as well and therefore make Camel fail faster.

There is no example of the latter, you can find some unit tests however.

On Wed, Oct 5, 2016 at 12:23 PM, idioma <> wrote:
> Hi,
> I have been experimenting with:
> as I would like to define my rest endpoints with Camel Rest DSL and generate
> my swagger API doc with camel-swagger-java.
> As per, I read "Then
> because of the swagger api we are able to validate and know if the payload
> is validate before calling the service." What does it expressely mean? Does
> it mean that I can somehow validate the swagger API as generated by the Java
> code? How do I do that?
> Thank you,
> I.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
----------------- @davsclaus
Camel in Action 2:

View raw message