Bug Report Checklist
Description
If you have this configuration
<skipIfSpecIsUnchanged>true</skipIfSpecIsUnchanged>
<cleanupOutput>true</cleanupOutput>
that's effectively as if you hadn't used <skipIfSpecIsUnchanged> at all. All files would be regenerated every time.
Combining them is actually a feasible thing b/c for setups that hold the generated files in their repository, they want no-longer existing model files to disappear, which can only happen when the directory is cleaned before regeneration. At the same time, you wouldn't want all the files to be regenerated on every run, b/c due to the generated annotation @javax.annotation.Generated( date = … ) all files would should up as changed, even if the spec didn't change at all.
openapi-generator version
7.0.1-SNAPSHOT
Suggested fix
This one is pretty simple: cleanupOutput needs to be evaluated after skipIfSpecIsUnchanged in CodeGenMojo.java. I can submit a PR to fix this.
Bug Report Checklist
Description
If you have this configuration
that's effectively as if you hadn't used
<skipIfSpecIsUnchanged>at all. All files would be regenerated every time.Combining them is actually a feasible thing b/c for setups that hold the generated files in their repository, they want no-longer existing model files to disappear, which can only happen when the directory is cleaned before regeneration. At the same time, you wouldn't want all the files to be regenerated on every run, b/c due to the generated annotation
@javax.annotation.Generated( date = … )all files would should up as changed, even if the spec didn't change at all.openapi-generator version
7.0.1-SNAPSHOT
Suggested fix
This one is pretty simple:
cleanupOutputneeds to be evaluated afterskipIfSpecIsUnchangedinCodeGenMojo.java. I can submit a PR to fix this.