Skip to content

Instantly share code, notes, and snippets.

View nickl-'s full-sized avatar

Nick Lombard nickl-

View GitHub Profile
@nickl-
nickl- / gist:4337761
Created December 19, 2012 15:55
json-schema-core v4
{
"id": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Core schema meta-schema",
"common": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#" }
},
@nickl-
nickl- / gist:4365888
Last active December 10, 2015 02:09
json-draft3-schema
{
"$schema" : "http://json-schema.org/draft-03/schema#",
"id" : "http://json-schema.org/draft-03/schema#",
"type" : "object",
"properties" : {
"type" : {
"type" : ["string", "array"],
"items" : {
"type" : ["string", {"$ref" : "#"}]
@nickl-
nickl- / gist:4365898
Created December 23, 2012 20:37
address-schema
{
"description": "An Address following the convention of http://microformats.org/wiki/hcard",
"type": "object",
"properties": {
"post-office-box": { "type": "string" },
"extended-address": { "type": "string" },
"street-address": { "type": "string" },
"locality":{ "type": "string", "required": true },
"region": { "type": "string", "required": true },
"postal-code": { "type": "string" },
@nickl-
nickl- / gist:4365916
Created December 23, 2012 20:37
calendar-schema
{
"description": "A representation of an event",
"type": "object",
"properties": {
"dtstart": {
"format": "date-time",
"type": "string",
"description": "Event starting time",
"required": true
},
@nickl-
nickl- / gist:4365932
Created December 23, 2012 20:38
card-schema
{
"$schema": "http://json-schema.org/draft-03/schema#",
"description": "A representation of a person, company, organization, or place",
"type": "object",
"properties": {
"fn": {
"description": "Formatted Name",
"type": "string"
},
"familyName": { "type": "string", "required": true },
@nickl-
nickl- / gist:4365936
Created December 23, 2012 20:39
geo-schema
{
"description": "A geographical coordinate",
"type": "object",
"properties": {
"latitude": { "type": "number" },
"longitude": { "type": "number" }
}
}
@nickl-
nickl- / gist:4365944
Created December 23, 2012 20:40
hypermedia-schema
{
"$schema": "http://json-schema.org/draft-03/hyper-schema#",
"id": "http://json-schema.org/draft-03/hyper-schema#",
"extends": { "$ref": "http://json-schema.org/draft-03/schema#" },
"properties": {
"links": {
"type": "array",
"items": { "$ref": "http://json-schema.org/draft-03/links#" }
},
"fragmentResolution": {
@nickl-
nickl- / gist:4365949
Created December 23, 2012 20:41
hypermedia-links-schema
{
"$schema": "http://json-schema.org/draft-03/hyper-schema#",
"id": "http://json-schema.org/draft-03/links#",
"type": "object",
"properties": {
"href": {
"type": "string",
"required": true
},
@nickl-
nickl- / gist:4365978
Created December 23, 2012 20:44
json-ref-schema
{
"$schema": "http://json-schema.org/draft-03/hyper-schema#",
"id": "http://json-schema.org/draft-03/json-ref#",
"additionalItems": { "$ref": "#" },
"additionalProperties": { "$ref": "#" },
"links": [
{
"href": "{id}",
"rel": "self"
},
@nickl-
nickl- / gist:4365985
Created December 23, 2012 20:45
interface-schema
{
"extends":"http://json-schema.org/hyper-schema",
"description":"A schema for schema interface definitions that describe programmatic class structures using JSON schema syntax",
"properties":{
"methods":{
"type":"object",
"description":"This defines the set of methods available to the class instances",
"additionalProperties":{
"type":"object",
"description":"The definition of the method",