...
Method 1 (server integration)
- Used the sample provided by swagger-core project (https://github.com/wordnik/swagger-core/tree/master/samples/java-resteasy)
- Problem:
- Current swagger doesn't support this "auto-scan" capability. Currently Cyberintegrator uses "auto-scan" capability of RestEasy (it scans the resources in the source code and adds to the Application automatically).
- Tested http://igaffa.blogspot.com/2013/07/swagger-with-resteasy-in-jboss.html but some parts of the codes are not clear to implement
Method 2 (generating json)
swagger-maven-plugin (https://github.com/kongchen/swagger-maven-plugin)
This is the maven plugin that generate the json files and html file by using swagger java annotations in the code
- It generates the json files such as service.json, workflows.json, datasets.json by using swagger java annotations in the code. Also, it generates single api html file.
- Loaded the each json files into swagger-UI and worked.
- Problem:
- Swagger-UI with "service.json" supposes to connect to other jsons like workflows.json and datasets.json. But it didn't work. It may need to be tested with the pom.xml configuration for the maven plugin
enunciate (http://enunciate.codehaus.org/)
This is a tool that generate swagger-UI, htmls, etc by using JAX-RS java annotations. It can be ran as a command-line tool or maven-plugin