Created
October 3, 2014 20:58
-
-
Save jsmestad/99f736797759fb1b0724 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "http://jsonapi.org/schema#", | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"title": "JSON API Schema", | |
"description": "This is a schema for responses in the JSON API format. For more, see http://jsonapi.org", | |
"type": "object", | |
"resources":{ | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"id": { "type":["string"] }, | |
"href": { "type":"string" }, | |
"links": { "type": "object" } | |
}, | |
"required": ["id"] | |
} | |
}, | |
"patternProperties": { | |
"^(?!href$)(?!links$)(?!id$)(?!meta)(?!linked)": { | |
"$ref":"#/resources" | |
} | |
}, | |
"properties": { | |
"meta": { | |
"type": "object" | |
}, | |
"links":{ | |
"type": "object" | |
}, | |
"linked": { | |
"type": "object", | |
"patternProperties": { | |
".*": { | |
"$ref":"#/resources" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment