docpad-plugin-schema
v2.7.0
Published
Lets you attach JSON schema to your collection
Downloads
13
Maintainers
Readme
Lets you attach JSON schema to your collection
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
Discover the release history by heading on over to the HISTORY.md file.
Discover how you can contribute by heading on over to the CONTRIBUTING.md file.
These amazing people are maintaining this project:
No sponsors yet! Will you be the first?
These amazing people have contributed code to this project:
Discover how you can contribute by heading on over to the CONTRIBUTING.md file.
Unless stated otherwise all works are:
and licensed under: