Skip to content

Commit

Permalink
added section on validation
Browse files Browse the repository at this point in the history
  • Loading branch information
trescube committed Jan 25, 2017
1 parent 72c74b8 commit 042b24c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ PELIAS_CONFIG=/path/config.json \
node -e "console.log( require('pelias-config').generate().stringify() );";
```

### Validation

Aside from `deep`, the `generate` function takes an additional parameter named `schema` that uses [Joi](https://www.npmjs.com/package/joi) to validate that the configuration is useable. An error is thrown if the generated configuration does not validate against the schema.

### Exporting & Debugging

The generated config will be a [mergeable](https://github.com/pelias/mergeable) object:
Expand Down

0 comments on commit 042b24c

Please sign in to comment.