{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
        "ChildFoo": {
            "type": "object"
        },
        "Foo": {
            "properties": {
                "childFoos": {
                    "allOf": [
                        {
                            "$ref": "#/definitions/Foo"
                        },
                        {
                            "$ref": "#/definitions/ChildFoo"
                        }
                    ]
                }
            },
            "required": [
                "childFoos"
            ],
            "type": "object"
        }
    },
    "properties": {
        "Foo": {
            "$ref": "#/definitions/Foo"
        }
    },
    "required": [
        "Foo"
    ]
}