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
Is your feature request related to a problem? Please describe.
I have a large schema with many basic elements, where the element subschema is just eg {type:"string"} or similar.
If every element needs to have a type it causes headaches in Go, because an alias of a string is not a string, and it requires lots of explicit casting.
Describe the solution you'd like
Perhaps there could be a flag like 'primitive_types' that, if a subschema specifies only type, will not create a new alias but just use the builtin language type.
Describe alternatives you've considered
I tried defining "title":"string" but that creates an alias called String, same issue.
I considered using a postprocessor to remove those unnecessary aliases, but preferably it could be handled by the transpiler.
I considered monkey-patching the library, but I'm not sure where and what I'd have to tweak.
Is your feature request related to a problem? Please describe.
I have a large schema with many basic elements, where the element subschema is just eg
{type:"string"}
or similar.If every element needs to have a type it causes headaches in Go, because an alias of a string is not a string, and it requires lots of explicit casting.
Describe the solution you'd like
Perhaps there could be a flag like 'primitive_types' that, if a subschema specifies only type, will not create a new alias but just use the builtin language type.
Describe alternatives you've considered
I tried defining
"title":"string"
but that creates an alias calledString
, same issue.I considered using a postprocessor to remove those unnecessary aliases, but preferably it could be handled by the transpiler.
I considered monkey-patching the library, but I'm not sure where and what I'd have to tweak.
Additional context
Go example: https://play.golang.com/p/YOf3DeL3_Ut
The text was updated successfully, but these errors were encountered: