camel-users mailing list archives

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

So Camel provides a rest-dsl which allows to expose RESTful services in Camel.
http://camel.apache.org/rest-dsl

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 <corda.ilaria@gmail.com> wrote:
> Hi,
> I have been experimenting with:
>
> https://github.com/apache/camel/tree/master/examples/camel-example-swagger-xml
>
> 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 https://issues.apache.org/jira/browse/CAMEL-10164, 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: http://camel.465427.n5.nabble.com/Swagger-validation-with-camel-swagger-tp5788403.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Mime
View raw message