-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Bug] Incorrectly generated docs/docs.go
file
#1895
Comments
Actually, your app doesn't build 😄 I guess you are using the latest swag version and you missed updating swago/swag version in go.mod. |
@ubogdan And as I said before, I've been running this in docker, where on container start, it installs the latest version. This issue occurs on a fresh container build |
My apologies, you were right. It seems to be fine now on the latest version, v1.16.4, after defining this in In any case, it is working now. Thank you |
Describe the bug
swag init
command generates incorrect docs.go file causing the application to crash upon importingTo Reproduce
Steps to reproduce the behavior:
@tag
sdocs
moduleswag init
go run <main_file>.go
Expected behavior
The docs.go file should be be generated with all the correct fields
Actual behavior
The file is generated with fields that are not present in the struct definition
Perhaps these fields were removed in a previous release with the docs.go template not being updated?
Screenshots


Your swag version
Your go version
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: