{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "definitions": {
        "custom": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "definitions": {
                "fooDef2": {
                    "type": "object",
                    "properties": {
                        "prop1": {
                            "type": "number"
                        }
                    }
                }
            },
            "fooDef1": {
                "type": "object",
                "properties": {
                    "baz": {
                        "type": "object",
                        "properties": {
                            "prop1": {
                                "type": "number"
                            }
                        }
                    }
                }
            }
        }
    },
    "properties": {
        "bar": {
            "type": "object",
            "properties": {
                "baz": {
                    "type": "object",
                    "properties": {
                        "prop1": {
                            "type": "number"
                        }
                    }
                }
            }
        }
    }
}