{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "MyAlias": {
            "$ref": "#/definitions/MySubObject",
            "description": "My sub object"
        },
        "MyString": {
            "description": "My string",
            "type": "string"
        },
        "MySubObject": {
            "description": "My sub object",
            "properties": {
                "propA": {
                    "type": "number"
                },
                "propB": {
                    "type": "number"
                }
            },
            "required": [
                "propA",
                "propB"
            ],
            "type": "object"
        }
    },
    "description": "My Object",
    "properties": {
        "alias": {
            "$ref": "#/definitions/MyAlias"
        },
        "object": {
            "$ref": "#/definitions/MySubObject"
        },
        "primitive": {
            "$ref": "#/definitions/MyString"
        }
    },
    "required": [
        "primitive",
        "object",
        "alias"
    ],
    "type": "object"
}