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 fields of a struct that have the same type are defined as comma separated,
swag ignores the fields except the first one.
To Reproduce
Define a Go struct with the following syntax
typePointstruct {
SRIDintX, Yfloat64// Notice these are on the same line and this is a valid syntax
}
Generate the spec for this struct.
Get a struct that has the Y field missing.
Expected behavior
Expected the generated swagger model/schema to have the missing y field
Screenshots
If applicable, add screenshots to help explain your problem.
Your swag version
1.16.3
Your go version
1.22.5
Desktop (please complete the following information):
OS: Debian 12 in WSL
Browser: Firefox
Version: N/A
Additional context
The type I'm using is imported from another package, so I can't really fix the type definition in Go without making a huge PR.
The text was updated successfully, but these errors were encountered:
that-ambuj
changed the title
swag does not generate spec for struct defined in as comma separated
swag does not generate spec for struct fields defined in comma separated syntax
Aug 18, 2024
Describe the bug
When fields of a struct that have the same type are defined as comma separated,
swag ignores the fields except the first one.
To Reproduce
Y
field missing.Expected behavior
Expected the generated swagger model/schema to have the missing
y
fieldScreenshots
If applicable, add screenshots to help explain your problem.
Your swag version
1.16.3
Your go version
1.22.5
Desktop (please complete the following information):
Additional context
The type I'm using is imported from another package, so I can't really fix the type definition in Go without making a huge PR.
The text was updated successfully, but these errors were encountered: