Open raphael-chir opened 7 years ago
In my understanding this maven plugin (as the word "codegen" implies) is focused on generating code from an OpenAPI specification (e.g. from a swagger.yaml).
To do the other way around (code to spec) try another maven plugin like https://github.com/kongchen/swagger-maven-plugin or in terms of using Spring try http://springfox.github.io/springfox
Description
Actually we have to specify in Maven plugin "swagger-codegen-maven-plugin" an "inputSpec" value in plugin execution configuration. I didn't find a way to dynamically generate it from REST resources Spring class instead of a static file or an uri. It supposed that the server is already running to have the specs in v2/api-docs It would be nice if we can build the server jar and the relative REST client jar. So consumers of this REST API are always aware (in a SNAPSHOT case) of specs evolution on the server.
Swagger-codegen version
2.3.0
Suggest a fix/enhancement
Something like this could be useful in the server pom.xml, in an assembler profile for instance :
``