I propose change to JSON Node, to improve UX:
- Add checkbox "JSON Validation Schema" - when clicked displays JSON Editor
Benefits:
- Schema validation support is visible from Node
- Using only one node instead of two (passing schema in msg.schema)
- More readable from flow perspective
Yes, this was always the longer term plan for the node. Adding support for msg.schema was the initial change to allow validation without having to do all the UI work as well.
What about adding dropdown list with draft version to use?
Is there a validator library that supports multiple ?
As far as I can tell from its readme, the library we already use does support multiple drafts.
1 Like
Indeed, it should already support all versions.
Regarding the version to use, currently it will validate against draft-04 and 07, I can also add draft-06. You would select this in your schema with the $schema keyword:
"$schema": "http://json-schema.org/draft-07/schema#"
If no $schema
is defined it will validated against draft-07 by default.