12

I can generate swagger UI on my Spring boot application from @Api @ApiOperation, @ApiResponses annotations.

These annotations makes code a bit dirty. I wonder, how I can generate swagger documentation for my API-endpoints from javadocs.

4

1 Answer 1

0

Short answer - No, not really.

Longer answer: Swagger files contains much more information than the code - for example @ApiOperation as you already mentioned. I would recommend to stick with Swagger Maven Plugin that I assume you already use. Our team have tried to auto-generate clients to run API tests against the generated swagger file, and so far spring-fox and other solutions doesn't come close to swagger-maven-plugin or hand coding the file.

Not the answer you're looking for? Browse other questions tagged or ask your own question.