Closed franksl closed 6 years ago
Error message for oneOf
, anyOf
and allOf
is indented multi-line, so you should be able to see the problem on every step line by line:
Failed due to logical constraint: no valid results for oneOf {
0: Enum failed, enum: ["a"], data: "f" at #->properties:root->patternProperties[^[a-zA-Z0-9_]+$]:zoo->oneOf[0]
1: Enum failed, enum: ["b"], data: "f" at #->properties:root->patternProperties[^[a-zA-Z0-9_]+$]:zoo->oneOf[1]
2: Failed due to logical constraint: no valid results for anyOf {
0: Enum failed, enum: ["c"], data: "f" at #->properties:root->patternProperties[^[a-zA-Z0-9_]+$]:zoo->oneOf[2]->anyOf[0]
1: Enum failed, enum: ["d"], data: "f" at #->properties:root->patternProperties[^[a-zA-Z0-9_]+$]:zoo->oneOf[2]->anyOf[1]
2: Enum failed, enum: ["e"], data: "f" at #->properties:root->patternProperties[^[a-zA-Z0-9_]+$]:zoo->oneOf[2]->anyOf[2]
} at #->properties:root->patternProperties[^[a-zA-Z0-9_]+$]:zoo->oneOf[2]
} at #->properties:root->patternProperties[^[a-zA-Z0-9_]+$]:zoo
at
item shows the path to invalid data and schema
#->properties:root->patternProperties[^[a-zA-Z0-9_]+$]:zoo->oneOf[2]
Schema path: /properties/root/patternProperties/^[a-zA-Z0-9_]+$/oneOf/2
Data path: /root/zoo
I'm working on improving readability/debugability of error messages, will push update soon.
Hello, It would be very useful to have a parseable or simplified notification for errors to allow for better recognition. This happens to me especially when I use many "oneOf" statements along with "patternProperties". For example given a schema similar to this:
I receive an error like:
It's very difficult to understand the exact property that was written wrong and where.
Thanks, Frank