-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
array with items field in oneOf #3877
Comments
Link to the playground with this error |
@aurelien-brevet I switched around the JSON Schema a little bit in this playground and am wondering if this works for you? Note that
|
HI @heath-freenome, Thanks for your suggestion, but the result is not the same. I want to prohibit mixing values of different types. Using my schema:
is not valid but valid with yours. |
@aurelien-brevet Good point. I believe that this playground example does what you want |
I'm also encountering this issue with a number of JSON schemas in the STAC ecoystem When I paste in this JSON Schema, it parses a few fields but then errors with
the section with the missing items definition
I had some trouble figuring out the source of this issue since I'm not too familiar with JS. So I tested out another extension, the EO extension JSON Schema, and it also has this same issue with the same field and error. When the schema is edited to add an items definition to the stac_extensions field, rendering the EO schame.json works in the form filler playground. Adding this renders the field
like so
However I'm hoping that there can be a way to not require updates to all the schemas for these to work in this tool. I think this issue is related to #3843 because with these JSON schemas sometimes the array contains a const and therefore might not need an explicit item field with a type definition in order to render it in the form. |
Prerequisites
What theme are you using?
core
Version
5.13.0
Current Behavior
Error: Unsupported field schema for field root_possibleValues: Missing items definition.
Expected Behavior
No error.
Array with either elements of type number or string.
Steps To Reproduce
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: