{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "pets": {
            "enum": [
                "cat",
                "dog",
                "parrot",
                "hamster"
            ],
            "type": "string"
        },
        "myType": {
            "required": [
                "dog"
            ],
            "type": "object",
            "properties": {
                "dog": {
                    "type": "string"
                }
            }
        }
    },
    "properties": {
        "pets": {
            "$ref": "#/definitions/pets"
        },
        "myType": {
            "$ref": "#/definitions/myType"
        }
    },
    "required": [
        "pets",
        "myType"
    ]
}