-
Notifications
You must be signed in to change notification settings - Fork 11
Improve error messages of JSON validator #31
Comments
The JSON validator will still expose the same api but use jjv (https://github.com/acornejo/jjv) as actual validator and jjve (https://github.com/silas/jjve) as message generator for the jjv output. |
Implemented on Upgrade InformationThe self-written JSON validator was replaced by jjv as actual validator and jjve as message generator for the jjv output. The api exposed by the LaxarJS validator didn't change. The JSON instantiator was removed in favor of jjv, which also has the ability to apply default values from the schema if necessary. Mandatory changesThe usage of two new external libraries induces a mandatory addition in the configuration for RequireJS in an application (
Optional upgradeA minimal v3 to v4 schema transformation of the Example of a v4 schema:
The v3 version would have been:
|
Currently the JSON validator only prints the name of the erroneous attribute when the validation of a property by schema fails. In many cases this is not helpful at all, if for example a widget has many features, each with e.g. a property
resource
and the error message only says that the configuration forresource
is insufficient. The expected output is the full path to the property, e.g.someFeature.resource
.The text was updated successfully, but these errors were encountered: