I am using tynamo resteasy with my Tapestry 5.4 project. I'd like to incorporate Swagger to document and share API with other other teams. While I see that swagger is already in RestEasy's project dependency, it does not work "out of the box"
I've added
@Api to the "Resource" class (located in /rest/ package)
and
@ApiOperation to the GET method
Do I need to change AppModule or web.xml in anyway to hook the swagger UI?
Is there an example (github etc.) anywhere that I can follow?
Also, will the swagger api be available at localhost/swagger/myendpoint?
Here's a step by step process:
Get swagger-jaxrs: https://mvnrepository.com/artifact/io.swagger/swagger-jaxrs/1.5.0
Create a
SwaggerModule.javain "modules" directory (example:com.mysite.mypkg.modules)On your AppModule.java, import the SwaggerModule (Tapestry 5.4)
The
swagger.jsonandswagger.yamlcan now be accessed as:Many thanks to @ascandroli above for pointing out the basics