Skip to content

Instantly share code, notes, and snippets.

@billibala
Created May 5, 2018 18:14
Show Gist options
  • Save billibala/bf5221898fbf0ab9123ce64022ef3204 to your computer and use it in GitHub Desktop.
Save billibala/bf5221898fbf0ab9123ce64022ef3204 to your computer and use it in GitHub Desktop.
Improved schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "",
"type": "object",
"patternProperties": {
"^(price|barcode|sku)$": {
"anyOf":[
{
"type": "string"
},
{
"type":"integer"
}
]
}
},
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
}
},
"required":[
"sku"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment