Describe the bug
Can't generate description for object type in its definition.
To Reproduce
Trying to add comments/annotations everywhere for my Errors struct but can't achieve expected behavior.
// Contextual errors map
type Errors struct {
DataLayerName string `json:"dataLayerName,omitempty" example:"can't be empty"`
}
type ErrorsResponse struct {
// Contextual errors map
Errors *Errors `json:"errors,omitempty"`
// List of important notifications
Notification []string `json:"notification,omitempty" example:"some important notification, other important notification"`
}
Expected behavior
"handlers.Errors": {
"type": "object",
"description": "Contextual errors map",
"properties": {
"dataLayerName": {
"type": "string",
"example": "can't be empty"
},
Visually it will look like on screenshot in Swagger UI Models if "description" will be there(added it manually):

Actual behavior
But got it without "description": "Contextual errors map":
"handlers.Errors": {
"type": "object",
"properties": {
"dataLayerName": {
"type": "string",
"example": "can't be empty"
},
And in Swagger UI there is no description like on screenshot above.
Your swag version
latest master v1.6.6-0.20200519063744-e07798f56b23
Your go version
1.12.17
Desktop:
- OS: Ubuntu
- Version: 18.04
Describe the bug
Can't generate description for object type in its definition.
To Reproduce
Trying to add comments/annotations everywhere for my Errors struct but can't achieve expected behavior.
Expected behavior
Visually it will look like on screenshot in Swagger UI Models if "description" will be there(added it manually):

Actual behavior
But got it without
"description": "Contextual errors map":And in Swagger UI there is no description like on screenshot above.
Your swag version
latest master v1.6.6-0.20200519063744-e07798f56b23
Your go version
1.12.17
Desktop: