[General] We should add more data to the generated headers
Currently a generated header in Swift for example is: // // Foo.swift // // Generated by swagger-codegen // https://github.com/swagger-api/swagger-codegen //
It would be useful to also include: -The date of code generation -The version of swagger used to generate the code -Any other useful information that we can add there?
I agree. I think there should be standard header for all generated codes. I'll submit a PR this weekend or early next week if no one else has cycle to work on it.
cool thx.
I wanted to provide some perspective as a swagger-codegen user. We find these date based annotations add a lot of noise to our review process when we regenerate clients.
We solved this problem by writing post-processing scripts but I thought it worth mentioning even if our use-case was a minority.
@jqr thanks for sharing the requirement with us.
so ideally the generator should skip the file if the newly-generated file and the one in the output directory are the same, right?
What about putting the date in one file only (e..g pom.xml for Java, Gemfile for Ruby, etc)?
Submitted https://github.com/swagger-api/swagger-codegen/pull/2008 for Ruby mustache templates. Let me know if you've any feedback.
Will gradually update mustache templates for other languages with similar change.
Closed via https://github.com/swagger-api/swagger-codegen/issues/2963