Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 1.53 KB

README.md

File metadata and controls

30 lines (18 loc) · 1.53 KB

$validate

The validate script runs data validation to ensure the data files match the schema.

Note: There are two schemas, one for the source data (located in the data/ directory of this repository), and one for the generated data files (not included in repository). The generated data files are created by running the build command and are stored outside the root of this repository.

The script will provide detailed output about any validation errors, including a link the exact the exact location of the error in the JSON file. This make is easy to quickly find and address any validation errors in the source data.

Usage

$ node cli/validate [<target>] [--verbose, -v]

Arguments

Name default description
<target> source The data files to target: source or generated
--verbose -v false Validation errors will also show the full object in which the error occurred

Examples

⚠️ To run CLI scripts as executables, you need to run npm link from the project root during initial setup. Otherwise, replace validate with node cli/validate.

If you include the --verbose flag, it will also output the objects where validation errors occurred.