You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When attempting to set the value of a @param query to that of a userdefined struct. The number of params parsed is correct (2 fields, 2 params). However they are all the same key. If I gen the spec again it will show up with a different key but still all the same.
If you run it repeatedly the name for the query will change. But they will all be the same name.
I attempted to fix this myself, but after adding a unit test in parserv3_test.go, it appears to spit out the correct output. I just did something simple like this: (my the fail I'm targeting is the same as my main.go above)
Describe the bug
When attempting to set the value of a @param query to that of a userdefined struct. The number of params parsed is correct (2 fields, 2 params). However they are all the same key. If I gen the spec again it will show up with a different key but still all the same.
To Reproduce
Steps to reproduce the behavior:
main.go
with this content:If you run it repeatedly the
name
for the query will change. But they will all be the same name.I attempted to fix this myself, but after adding a unit test in parserv3_test.go, it appears to spit out the correct output. I just did something simple like this: (my the fail I'm targeting is the same as my main.go above)
Yes, I'm aware my expect and actual will never equal here. I just wanted to get something to see the diff and it appears fine.
Expected behavior
Params to be each individual key rather then the same one repeated
Your swag version
2.0.0
Your go version
1.21.0 darwin/arm64
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: