Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Proposal: Cleaner JSON Schemas #3625
I've been thinking about this for a bit, and I kind of hate what we have to do to support optional configuration options, like this:
IMHO, needing to put the error codes into the rules, explicitly, is a barrier to having a clean and loosely-coupled API.
Therefore, I'd like to propose that we no longer require rules to include
How would this work?
Basically, the validator will always just
So we remove the severity from the array and then apply the JSON schema.
The end result is that no schema ever needs to worry about severity codes under any circumstances.
It looks like linked example from
It would be a breaking change only for plugin creators, consumers will not see anything at all.
P.S. I didn't check but I would bet that not a lot of plugins are using schemas yet anyways, especially object notation for schema, so even in the case of plugin creators, it might only break a few plugins if any.