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
It seems that having an array of types (which is valid json schema) is not supported by this tool. For example "type": ["string", "null"] is displayed as "stringnull".
After taking a quick look at the code I believe the problem is coming from the following piece where the assumption is made that type is always a single value.
Using an array of types is particularly convenient to define a simple nullable type like a nullable string for example. A workaround is to use oneOf but this is a bit more verbose so it would be nice to support array of types I think.
Thanks,
Antoine
The text was updated successfully, but these errors were encountered:
Hi,
It seems that having an array of types (which is valid json schema) is not supported by this tool. For example
"type": ["string", "null"]
is displayed as "stringnull".After taking a quick look at the code I believe the problem is coming from the following piece where the assumption is made that
type
is always a single value.docs-react/src/JSONSchema/SchemaRenderer.tsx
Lines 172 to 175 in f8a233b
Using an array of types is particularly convenient to define a simple nullable type like a nullable string for example. A workaround is to use
oneOf
but this is a bit more verbose so it would be nice to support array of types I think.Thanks,
Antoine
The text was updated successfully, but these errors were encountered: