-
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
@name
doesn't work
#1909
Comments
Same issue, type UIElement struct {
Id string `json:"id"`
UIElement []UIElement `json:"UIElement"`
Title string `json:"title"`
} // @name UIElement the output is {
"internal_form_infrastructure_web_dto.UIElement": {
"type": "object",
"properties": {
"UIElement": {
"type": "array",
"items": {
"$ref": "#/definitions/internal_form_infrastructure_web_dto.UIElement"
}
},
"id": {
"type": "string"
},
"title": {
"type": "string"
}
}
}
} |
What should the correct output look like? |
@YlanzinhoY with this struct: type UpdateGameConfigRequest struct {
GameConfig model.GameConfig `json:"gameConfig" validate:"required"`
} // @name UpdateGameConfigRequest Here is when I run my code with swag The correct output should be |
In my case it will work when comment like |
This issue was introduced in the new version of swag@v2 I was using the previous version v2.0.0-rc3, but after updating to v2.0.0-rc4, the issue reappeared. |
Can someone take a look at it and write a PR? |
I'm figuring out which commit is, I found this one #1866 from this point the command doesn't work due to I'm still working on this investigation |
Describe the bug
When I upgraded swag from
1.16.3
to1.16.4
, I noticed the renaming model to display (@name
) didn't work in my struct:Expected behavior
@name
should be workingScreenshots
N/A
Your swag version
swag version v1.16.4
Your go version
go version go1.23.2 darwin/arm64
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: