JSON schema validator
Methods
(static) validate(content, schemaBasePath, schemaFileName) → {Array}
Validate the 'content' object with the JSON schema from 'schemaFileName' file
Parameters:
Name | Type | Description |
---|---|---|
content |
Object | The object to validate |
schemaBasePath |
String | The base path to the directory that contains the schema files |
schemaFileName |
String | The name of the schema file to validate by |
Returns:
- The list of errors ([] in case there was no error)
- Type
- Array
(inner) loadSchema(schemaFileName) → {Object}
Load the named JSON schema
Parameters:
Name | Type | Description |
---|---|---|
schemaFileName |
String | The name of the schema file |
Returns:
- The loaded schema
- Type
- Object