-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Problem statement
in our code we have this:
//swagger:type float64
type Decimal{
D decimal.Decimal
}
This causes some interesting problems
-
It does not override the struct type to float64 as the documentation suggests
-
it creates the following self referencing type. This causes an infinite loop in the swagger diff which is sub optimal.
"Decimal": {
"type": "object",
"properties": {
"D": {
"$ref": "#/definitions/Decimal"
}
},
"x-go-package": "github.com/SomeGit/package"
},
Having a look at the code myself I go a bit lost as to where to implement it it seems the rxType exists but no rxTypeFmt and its not put into the parser.
Either can someone have a crack at fixing it or point me in the right directions to create a fix to override the struct parsing.
Upon further investigation it seems this commit has been forgotten/merged out ...
No doubt because it did not have any tests.
ca670fa
Ive had a crack at it myself and got muddled up with the old +1.11 code and the codescan package. Also where do I write the tests?