Better logging for schema issues
See original GitHub issueDescription
When using a large schema, it can be hard to find the specific schema issue from the log warnings. I recently received:
ignoring oneOf in dependencies because there isn’t exactly one subschema that is valid
I know there is an issue with the dependency schema for my form, but unfortunately I have several oneOf dependencies for several refs and I’m having trouble tracking down which one this refers to.
Steps to Reproduce
Create a form with an invalid dependency schema using oneOf
Expected behavior
I’d love to know which schema key this refers to in the console log that outputs when the form knows there is an issue. An external validator tool could be another solution.
Actual behavior
Generic warning in console:
ignoring oneOf in dependencies because there isn’t exactly one subschema that is valid
Version
1.2.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)

Top Related StackOverflow Question
@epicfaace Ok, you can reference https://github.com/mozilla-services/react-jsonschema-form/pull/1224
I tried to do a very small change here, but it might be beneficial to update other warnings around the lib. But I don’t know the code well enough.
Hi @epicfaace I’m sure there are other examples, but the exact one I came up against was this
Inside the the
personref, I simply changed:to
Note the typo
yourin only one of the property definitions. So there is a mismatch.If you open the console, you’ll see:
Now, in my case, there were many of these
anyOfproperties. And I would have liked the warning message to simply tell me which one it was.For example: