Skip to content

Instantly share code, notes, and snippets.

@phstc
Created August 20, 2014 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phstc/c2e458f331e94fc172da to your computer and use it in GitHub Desktop.
Save phstc/c2e458f331e94fc172da to your computer and use it in GitHub Desktop.
{
"title": "Email Schema",
"type": "object",
"required": [
"to",
"sender_email",
"template"
],
"properties": {
"sender_email": {
"type": "string",
"minLength": 1
},
"sender_name": {
"type": "string"
},
"to": {
"type": "string",
"minLength": 1
},
"subject": {
"type": "string"
},
"template": {
"type": "string",
"minLength": 1
}
}
}
{
"title": "Product Schema",
"type": "object",
"required": [
"sku",
"description",
"price",
"cost_price"
],
"properties": {
"sku": {
"type": "string"
},
"description": {
"type": "string",
"pattern": "^banana$"
},
"price": {
"type": "number"
},
"cost_price": {
"type": "number"
},
"complete": {
"type": "boolean"
},
"country": {
"type": "string",
"enum": [
"USA",
"BR"
]
},
"nested": {
"type": "object",
"properties": {
"level1": { "type": "object", "required": ["level2"]},
"properties": {
"level2": { "type": "string" }
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment