Created
July 19, 2016 13:13
-
-
Save a-h/fbad64dd204e55f00ba1641d81bfe256 to your computer and use it in GitHub Desktop.
Test Schema
This file contains hidden or 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
| { | |
| "$schema": "http://json-schema.org/draft-04/schema#", | |
| "definitions": { | |
| "address": { | |
| "id": "address", | |
| "type": "object", | |
| "description": "Address", | |
| "properties": { | |
| "houseName": { | |
| "type": "string", | |
| "description": "House Name", | |
| "maxLength": 30 | |
| }, | |
| "houseNumber": { | |
| "type": "string", | |
| "description": "House Number", | |
| "maxLength": 4 | |
| }, | |
| "flatNumber": { | |
| "type": "string", | |
| "description": "Flat", | |
| "maxLength": 15 | |
| }, | |
| "street": { | |
| "type": "string", | |
| "description": "Address 1", | |
| "maxLength": 40 | |
| }, | |
| "district": { | |
| "type": "string", | |
| "description": "Address 2", | |
| "maxLength": 30 | |
| }, | |
| "town": { | |
| "type": "string", | |
| "description": "City", | |
| "maxLength": 20 | |
| }, | |
| "county": { | |
| "type": "string", | |
| "description": "County", | |
| "maxLength": 20 | |
| }, | |
| "postcode": { | |
| "type": "string", | |
| "description": "Postcode", | |
| "maxLength": 8 | |
| } | |
| } | |
| }, | |
| "status": { | |
| "type": "object", | |
| "properties": { | |
| "favouriteCat": { | |
| "enum": [ | |
| "A", | |
| "B", | |
| "C", | |
| "D", | |
| "E", | |
| "F" | |
| ], | |
| "type": "string", | |
| "description": "The favourite cat.", | |
| "maxLength": 1 | |
| } | |
| } | |
| } | |
| }, | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "address": { | |
| "$ref": "#/definitions/address" | |
| }, | |
| "status": { | |
| "$ref": "#/definitions/status" | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment