node-red-contrib-full-msg-json-schema-validation 1.1.0

JSON Schema validator for Node Red

npm install node-red-contrib-full-msg-json-schema-validation

JSON Full Schema validator for Node Red is pretty easy to use. Just open node properties and choose which property object wants to validate and paste JSON Schema

  • OK will returned in first response
  • KO will returned in second response. Error object with explanation will added in msg

JSON Schema:

{ "title": "Person", "type": "object", "required":["lastName"], "properties": { "firstName": { "type": "string", "description": "The person's first name." }, "lastName": { "type": "string", "description": "The person's last name." }, "age": { "description": "Age in years which must be equal to or greater than zero.", "type": "integer", "minimum": 0 } } }

Examples:

  • OK msg.payload= { "firstName": "John", "lastName": "Doe", "age": 1 };

  • KO msg.payload= { "firstName": "John", "age": 1 };

Node Info

Version: 1.1.0
Updated 5 years, 7 months ago
License: MIT
Rating: 5.0 1

Actions

Rate:

Downloads

245 in the last week

Nodes

  • json-full-schema-validator

Keywords

  • json
  • node
  • node-red
  • schema

Maintainers