Open tonidy opened 1 month ago
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 1.6.4
:
The correct output should be dto.UpdateGameConfigRequest
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.