Skip to content

Instantly share code, notes, and snippets.

@iamandrewluca
Created January 9, 2020 18:40
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 iamandrewluca/3e0438d344a83b9e64f3bdb4ffe25a1c to your computer and use it in GitHub Desktop.
Save iamandrewluca/3e0438d344a83b9e64f3bdb4ffe25a1c to your computer and use it in GitHub Desktop.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "/uses schema validation",
"type": "array",
"items": { "$ref": "#/definitions/page" },
"definitions": {
"page": {
"type": "object",
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"url": { "type": "string" },
"twitter": { "type": "string" },
"emoji": { "type": "string" },
"country": { "type": "string" },
"computer": {
"type": "string",
"enum": ["apple", "windows", "linux"]
},
"phone": {
"type": "string",
"enum": ["ios", "iphone", "android"]
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"name",
"description",
"url",
"country"
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment