{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "dog": {
            "allOf": [
                {
                    "$ref": "#/definitions/myString"
                },
                {
                    "minLength": 5,
                    "maxLength": 10
                }
            ]
        },
        "myString": {
            "type": "string"
        }
    },
    "properties": {
        "dog": {
            "$ref": "#/definitions/dog"
        },
        "myString": {
            "$ref": "#/definitions/myString"
        }
    },
    "required": [
        "dog",
        "myString"
    ]
}