Re:JSON Schema bundling formalised
by Too on Saturday September 11, 2021 @02:58AM
(#28489941)
What is hard to read and difficult to understand about this:
vs
Not claiming the later is particularly difficult, in fact it's very easy to understand, but it is sligthly more verbose and tedious, for bigger validations it can become even worse. Here the schema turns every 2-3 lines of custom validation code into 1, provides automatic and better error messages of the error cause and acts as a contract which consumers of the api can read or even use to auto generate code, GUI, autocompletion. For the later use cases you would of course put the schema in a separate public file. For more complex validation you can of course add them after calling schemaValidate.
[ Parent
| on HN ]
There are no comments on this comment yet.