tv4-loader
Webpack loader for validating json files against a schema file. Can be used in combination with json-loader.
Usage
module: preLoaders: test: path loader: 'tv4' query: schema: path loaders: test: /\.json$/ loader: 'json'
Query Parameters
schemas
- Pre-register a schema for reference by other schema and synchronous validation. See tv4 for further informations.checkRecursive
- Enable support for recursive schemas. See tv4 Documentation.banUnknownProperties
- Throw an error for all unknown properties used in your json file. See tv4 Documentation.
Known Limitations
schema
needs to be an absolute path to the schema file.
License
MIT