docpad-plugin-schema
Lets you attach JSON schema to your collection
Install
Install this DocPad plugin by entering docpad install schema
into your terminal.
Usage
To use this plugin you need to add schema
record into plugins object in docpad.coffee
.
Fields must match collection names, so if you have defined collection posts
here is example how it can look.
plugins:
schema:
posts: require './schema/postSchema.json' # schema for posts collection
Schema is compliant with JSON Schema draft v4.
Basic usage:
{
"type": "object",
"properties": {
"metadata": {"type": "string"},
"sort_metadata": {"type": "number"}
},
"required": ["metadata", "sort_metadata"]
}
TODO
- better readme
- more test coverage
- attach complex schemas
To be implemented if there is someone to actually use it, so feel free to file issues
History
Discover the release history by heading on over to the HISTORY.md
file.
Contribute
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
Backers
Maintainers
These amazing people are maintaining this project:
Sponsors
No sponsors yet! Will you be the first?
Contributors
These amazing people have contributed code to this project:
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
License
Unless stated otherwise all works are:
- Copyright © 2016+ Bevry Pty Ltd
and licensed under: