Forum Discussion

piyusht007's avatar
Occasional Visitor
3 years ago

Need to generate API Docs for plain Servlet

I am trying this example: to configure swagger with servlet.
Following this Servlet class from the example, I tried to configure my servlet class as well.
However the generated swagger.json only contains SwaggerDefinition and not scanning other annotations such as Api , @ApiOperation , @ApiImplicitParams , @ApiImplicitParam
Below is the swagger.json for reference:
{"swagger":"2.0","info":{"description":"This is a sample server","version":"1.0.0","title":"Swagger Sample Servlet","termsOfService":"","contact":{"name":"Sponge-Bob","url":"","email":""},"license":{"name":"Apache 2.0","url":""}},"tags":[{"name":"users","description":"Operations about user"}],"schemes":["http","https"],"consumes":["application/json","application/xml"],"produces":["application/json","application/xml"]}
Do we have any pointers to this? Also, is there a maven plugin like to generate the spec at BUILD phase for SERVLETS?
Any help is appreciated !!!
No RepliesBe the first to reply