JSON schemas for LOKE services
Install as a node module:
npm i -S LOKE/schemas#master
Require in, and use in validators:
const schemas = require("@loke/schemas");
myValidator.validate(someObject, schemas.TableBills.Bill);
For example, with Ajv:
const Ajv = require("ajv");
const ajv = new Ajv();
const schemas = require("@loke/schemas");
const validate = ajv.compile(schemas.TableBills.Bill);
const isValid = validate(objToCheck);