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
Since nullable is now deprecated (and never worked for $ref anyway) I am trying to find how to show a field as nullable.
I found that oneOf with a null type should work but the result shown is not that great, it literally show (with a $ref):
ONE OF
1 NULL
1 {
name: string
}
I was looking a way to show some kind of icon like readonly, is there a better way to do nullable fields ?
The text was updated successfully, but these errors were encountered:
after digging a bit more I realized that the way openapi seems to handle this, and this makes it really useless for me is to add null as an allowed type in the ref:
I thought that the ref was a bit more clever than that but maybe I should just stop using it altogether since my code is generated anyway... My real problem is more general: OAI/OpenAPI-Specification#2026
and btw when using type array as you shown the way it is displayed is still not that great but that's a nitpick ;)
Since
nullable
is now deprecated (and never worked for $ref anyway) I am trying to find how to show a field as nullable.I found that oneOf with a null type should work but the result shown is not that great, it literally show (with a $ref):
I was looking a way to show some kind of icon like readonly, is there a better way to do nullable fields ?
The text was updated successfully, but these errors were encountered: