Generate Swagger json from Swagger annotations

453 views
Skip to first unread message

Kallen

unread,
Jul 18, 2016, 10:57:11 PM7/18/16
to Swagger
I'm looking for a way to generate the swagger json files from swagger annotated java classes.  All the examples seem to revolve around serving from within a web container where swagger scans with reflection at run time.  Seems like this is possible to do but no clear examples.

Thanks in advance

Ron Ratovsky

unread,
Jul 18, 2016, 11:15:04 PM7/18/16
to swagger-sw...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kallen

unread,
Jul 19, 2016, 5:47:32 PM7/19/16
to Swagger
Was looking for something that didn't pull in JAX-RS and just leveraged the swagger annotations.  I found the swagger-servlet module helped me understand what needs to be done to just scan for swagger annotations and build the Swagger model for output to json.  

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

Ron Ratovsky

unread,
Jul 19, 2016, 7:05:38 PM7/19/16
to swagger-sw...@googlegroups.com

You can write your own Reader, yes. Swagger-core at its base is intended for jax-rs and servlets only. You didn’t mention which library you use to expose your REST API (if any).

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--

You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages