Skip to content
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

[GO] Bug when other go tools does not see code generated by swagger-codegen as code generated #12358

Open
jensravn opened this issue Mar 20, 2024 · 0 comments

Comments

@jensravn
Copy link

Description

Go code generated by swagger-codegen has a line with the following comment:

* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

This comment does not match the pattern for generated code in go:

^// Code generated .* DO NOT EDIT\.$

Described here https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source

Swagger-codegen version

3.0.54

Swagger declaration file content or url
Command line used for generation
swagger-codegen generate -i swagger.yaml -l go
Steps to reproduce
Related issues/PRs

This PR fixes the issue #12357

Suggest a fix/enhancement

The fix could be to change the line to the following

// Code generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) DO NOT EDIT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant