Generating static HTML documentation from JAX-RS interface without Swagger annotations

374 views
Skip to first unread message

Mirko Raner

unread,
May 10, 2016, 9:08:08 PM5/10/16
to Swagger
In short, I would like to create some static Swagger HTML documentation from a JAX-RS interface that does not have Swagger annotations.

Here is what I have:
  • a fully JAX-RS-annotated Java interface
  • full Javadoc for each method
  • @PathParam, etc., annotation that link headers, URL placeholders, etc. to method parameters
  • fully javadoc'd POJO classes that are used as part of the REST API
Here is what I want:
  • a Swagger-style static HTML page (including CSS) that describes my API
  • it should include parameter descriptions based on the javadoc and JAX-RS annotations
  • it should include JSON descriptions based on the POJO classes
  • it should have the ability to generate HTML using a Maven plugin
Here is what I don't want:
  • Swagger @Api, etc. annotations
  • ability to test or try out the API dynamically
I tried using the swagger-maven-plugin, but without @Api and @ApiOperation it doesn't generate anything useful, and it doesn't seem to pick up parameter descriptions from the javadoc either.

Am I completely barking up the wrong tree here, or am I just missing some simple configuration?

Thanks!

Mirko Raner

unread,
May 10, 2016, 9:30:10 PM5/10/16
to Swagger
I guess I'm looking for something similiar to Enunciate, but with a Swagger look...

tony tam

unread,
May 11, 2016, 12:01:54 AM5/11/16
to swagger-sw...@googlegroups.com
Hi, there is a static HTML generator but the intent of it is to show the capabilities of the code generator.  It works as a maven plugin, too, and you can add a single mustache template to customize it.

You can try that out by going to the http://editor.swagger.io and choose “generate client / HTML”.  The same is available from the swagger-codegen project.

--
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.

Reply all
Reply to author
Forward
0 new messages