swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
The codegen plugin currently always re-generates code, even though neither the plugin configuration nor the input specification file changed. This results in later Maven build steps to be also re-executed for no reason, which finally make build times much longer than necessary for rebuilds.
The plugin could write out a "stamp" file at a well-known location, containing a hash of the plugin configuration. The timestamp of the file itself serves as a marker for the last generation run and can be compared to the file specified as inputSpec parameter.
The plugin should then only re-generate code if either of the following statements is true:
Description
The codegen plugin currently always re-generates code, even though neither the plugin configuration nor the input specification file changed. This results in later Maven build steps to be also re-executed for no reason, which finally make build times much longer than necessary for rebuilds.
Swagger-codegen version
3.0.18
Swagger declaration file content or url
not relevant
Command line used for generation
Plugin configuration:
Steps to reproduce
Related issues/PRs
none
Suggest a fix/enhancement
The plugin could write out a "stamp" file at a well-known location, containing a hash of the plugin configuration. The timestamp of the file itself serves as a marker for the last generation run and can be compared to the file specified as
inputSpec
parameter.The plugin should then only re-generate code if either of the following statements is true:
inputSpec
file is newer than our marker file