-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: exclude Swagger Codegen files #4967
Conversation
a193410
to
cc0eeba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make this configurable so the user can set their own pattern?
I don't think we need a configuration: the This PR is a type of "workaround" before Swagger changes its pattern to follow the standard because Swagger should change its pattern. |
Why is Swagger different from any other code that diverges from the standard such that we should add workarounds? I agree lax mode is a bit weird, if the user could configure their own patterns we could get rid of it and only support the official pattern. Anyone using code that doesn't follow that (like Swagger) could add their own patterns. |
It's not so different but Swagger/OpenAPI is, I think, the most popular format for API documentation. People should follow the Go standard comment pattern for generated code, it's the standard. |
Fixes #4965
The pattern used by Swagger Codegen is here: https://github.com/swagger-api/swagger-codegen/blob/61cfeac3b9d855b4eb8bffa0d118bece117bcb7d/modules/swagger-codegen/src/main/resources/go/partial_header.mustache#L16
Related issue: swagger-api/swagger-codegen#12358