Open cbndr opened 4 years ago
Would it be possible to treat a oneOf of 2 types where one is null as optional? Example:
oneOf
null
"oneOf": [ { "type": "integer", "format": "int32" }, { "type": "null" } ]
currently generates an interface{} type in Go. IMO it would be preferable to generate a *int instead. I know this could be coded differently in JSON schema to generate the desired output, but unfortunately, the schema is not under our control.
interface{}
*int
Would it be possible to treat a
oneOf
of 2 types where one isnull
as optional? Example:currently generates an
interface{}
type in Go. IMO it would be preferable to generate a*int
instead. I know this could be coded differently in JSON schema to generate the desired output, but unfortunately, the schema is not under our control.