svelte-jsonschema-form
svelte-jsonschema-form copied to clipboard
anyOf without visual components
trafficstars
This isn't terribly pressing but I wanted to make an issue for what we saw yesterday. Basically, it is possible for anyOf to be used in JSONSchema to ensure other constraints about an object. In yesterday's example, we were trying to ensure that at least one key was required in an object. The suggested solution was to do something like this:
{
"anyOf": [
{ "required": ["key1"] },
{ "required": ["key2"] },
// ...
{ "required": ["keyN"] }
]
}