-
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
Labels
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: