You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I generate the spec for Foo, the type of Bar is integer, when it should in fact be string.
Proposed solution
In parseJSONTag(), also return a boolean indicating that the field has the ",string" directive. When the field's type is determined, override it with type:string and format: if the directive is present.
Swagger specification
2.0
Steps to reproduce
N/A
Environment
swagger version: 2.0
go version: 1.10.1
OS: macOS 10.12.6
The text was updated successfully, but these errors were encountered:
Problem statement
I have a field in a response struct which specifies that it's encoded as a string when marshalled to JSON.
When I generate the spec for Foo, the type of Bar is integer, when it should in fact be string.
Proposed solution
In parseJSONTag(), also return a boolean indicating that the field has the ",string" directive. When the field's type is determined, override it with type:string and format: if the directive is present.
Swagger specification
2.0
Steps to reproduce
N/A
Environment
swagger version: 2.0
go version: 1.10.1
OS: macOS 10.12.6
The text was updated successfully, but these errors were encountered: