diff --git a/parser_test.go b/parser_test.go index 1506acb19..5282f8e88 100644 --- a/parser_test.go +++ b/parser_test.go @@ -1800,6 +1800,7 @@ func TestParseStructComment(t *testing.T) { }, "definitions": { "web.APIError": { + "description": "API error with information about it", "type": "object", "properties": { "createdAt": { diff --git a/testdata/struct_comment/web/handler.go b/testdata/struct_comment/web/handler.go index 49674dae3..9ca0de6a2 100644 --- a/testdata/struct_comment/web/handler.go +++ b/testdata/struct_comment/web/handler.go @@ -15,6 +15,9 @@ type Post struct { } `json:"data"` } +// APIError +// @Description API error +// @Description with information about it type APIError struct { // Error an Api error Error string // Error this is Line comment