{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "description": "Your best friend",
    "properties": {
        "name": {
            "type": "string",
            "description": "How to call the dog"
        },
        "age": {
            "type": "integer",
            "description": "Number of years ( > 0 )",
            "minimum": 0
        },
        "owner": {
            "$ref": "#/definitions/Person",
            "description": "The person taking care of the dog"
        },
        "breed": {
            "$ref": "#/definitions/Breed",
            "description": "The breed if pure"
        }
    },
    "definitions": {
        "Person": {
            "type": "object",
            "description": "A human being",
            "properties": {
                "name": {
                    "type": "string"
                }
            }
        },
        "Breed": {
            "type": "string",
            "description": "Most popular breeds",
            "enum": [
                "LABRADOR",
                "BULLDOG",
                "YORKSHIRE"
            ]
        }
    }
}