General issues with anyOf
handling: vazco/uniforms#863
Error: Invariant Violation: Field not found in schema: "domainDash.0"
{
"domainDash": {
"anyOf": [
{
"description": "An array of alternating [stroke, space] lengths for dashed domain lines.",
"items": {
"type": "number"
},
"type": "array"
},
{
"$ref": "#/definitions/ExprRef"
}
]
}
}
Replace with
{
"domainDash": {
"description": "An array of alternating [stroke, space] lengths for dashed domain lines.",
"items": {
"type": "number"
},
"type": "array"
}
}
See e.g. vazco/uniforms#91
The reason this happens is that the _compiledschema
doesn't know how to handle it an array when it runs into an error so it doesn't create the first element which the library needs.
Error: Invariant Violation: Unsupported field type: boolean,number
{
"labelFlush": {
"description": "Indicates ...",
"type": ["boolean", "number"]
}
}
{
"labelFlush": {
"description": "Indicates ...",
"type": "number"
}
}
When some definitions had a $schema
key set, another error.
Also, something about cannot be represented by null when an anyOf
has null as the first option. That's from vazco/uniforms#863, because Uniforms only looks at the type
of the first option.
Best to remove "type": null
s then, although they do have semantic importance.
Nested anyOfs e.g. tickColor
Error: unknown format "color-hex" ignored in schema at path "#/definitions/HexColor"
Just delete
Uncaught Invariant Violation: Field not found in schema: "axis.values.0"
also delete
{
"values": {
"anyOf": [
{
"items": {
"type": "number"
},
"type": "array"
},
{
"items": {
"type": "string"
},
"type": "array"
},
{
"items": {
"type": "boolean"
},
"type": "array"
},
{
"items": {
"$ref": "#/definitions/DateTime"
},
"type": "array"
}
],
"description": "Explicitly set the visible axis tick values."
},
}
In anyOf
Remove type: Null
, ExprRef
and Condition*
if present.
Jump up one if only one element in anyOf