camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gagahhag <>
Subject Camel Swagger cdi Example
Date Fri, 12 Feb 2016 08:05:08 GMT
Hey all
I was playing around with building REST services and tried out the Camel
Swagger cdi Example. It turns out, that it works as expected but is not
generating a valid Swagger definition (camel-swagger-java:2.16.2):

- No response definition in the put-definition
-> Added manually a new one:

- get(/{id}) request has defined a wrong dataType, "int" instead of

Those above two problems can easily be solved.

- get(/{id}) request generates an empty enum ("enum" : [ ]) in the parameter
definition which should no be there. This is new since

The snipped (from below is valid when using
rest("/user").description("User rest service")

            .get("/{id}").description("Find user by id").outType(User.class)
                .param().name("id").type(path).description("The id of the
user to get").dataType("integer").endParam()

            .put().description("Updates or create a user").type(User.class)
                .param().name("body").type(body).description("The user to
update or create").endParam()

            .get("/findAll").description("Find all

Note: The generated swagger definition has been tested on


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message