Skip to content

Instantly share code, notes, and snippets.

@pritibiyani
Last active October 24, 2016 05:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save pritibiyani/b26cccedadbf59d6b95ca82b8cd23950 to your computer and use it in GitHub Desktop.
This is schema for sample book json.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"author": {
"type": "string"
},
"title": {
"type": "string"
},
"price": {
"type": "number",
"minimum": 0,
"exclusiveMinimum": true
},
"characters": {
"type": "array",
"items": {
"type": "string"
}
},
"adultBook": {
"type": "boolean"
},
"publishedOn": {
"type": "string",
"format": "date-time"
},
"category": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"author",
"title",
"price"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment