{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "Foo": {
            "title": "Foo",
            "type": "string"
        },
        "MyUnion": {
            "title": "MyUnion",
            "type": "string",
            "oneOf": [
                {
                    "$ref": "#/definitions/Foo"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                }
            ]
        },
        "MyEnum": {
            "title": "MyEnum",
            "type": "string",
            "enum": [
                "FIRST_ITEM",
                "SECOND_ITEM",
                "THIRD_ITEM"
            ]
        },
        "Stuff": {
            "title": "Stuff",
            "type": "object",
            "required": [
                "req_field"
            ],
            "properties": {
                "my_field": {
                    "type": "integer",
                    "title": "my_field",
                    "arguments": []
                },
                "req_field": {
                    "type": "string",
                    "title": "req_field",
                    "arguments": []
                },
                "recursion": {
                    "allOf": [
                        {
                            "$ref": "#/definitions/MoreStuff"
                        },
                        {
                            "title": "recursion"
                        }
                    ]
                },
                "custom_scalar": {
                    "allOf": [
                        {
                            "$ref": "#/definitions/Foo"
                        },
                        {
                            "title": "custom_scalar"
                        }
                    ]
                },
                "enum": {
                    "allOf": [
                        {
                            "$ref": "#/definitions/MyEnum"
                        },
                        {
                            "title": "enum"
                        }
                    ]
                }
            }
        },
        "MoreStuff": {
            "title": "MoreStuff",
            "type": "object",
            "required": [
                "identifier",
                "bool"
            ],
            "properties": {
                "first": {
                    "type": "array",
                    "items": {
                        "type": "number"
                    },
                    "title": "first",
                    "arguments": []
                },
                "identifier": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "title": "identifier",
                    "arguments": []
                },
                "reference": {
                    "allOf": [
                        {
                            "$ref": "#/definitions/Stuff"
                        },
                        {
                            "title": "reference"
                        }
                    ]
                },
                "bool": {
                    "type": "boolean",
                    "title": "bool",
                    "arguments": []
                },
                "union": {
                    "allOf": [
                        {
                            "$ref": "#/definitions/MyUnion"
                        },
                        {
                            "title": "union"
                        }
                    ]
                },
                "with_params": {
                    "type": "integer",
                    "title": "with_params",
                    "arguments": [
                        {
                            "title": "param1",
                            "type": {
                                "type": "integer"
                            },
                            "defaultValue": null
                        },
                        {
                            "title": "param2",
                            "type": {
                                "type": "array",
                                "items": {
                                    "type": {
                                        "type": "number"
                                    }
                                }
                            },
                            "defaultValue": null
                        }
                    ]
                }
            }
        },
        "InputType": {
            "title": "InputType",
            "type": "object",
            "input": true,
            "properties": {
                "an_int": {
                    "type": "integer",
                    "title": "an_int"
                },
                "a_string": {
                    "type": "string",
                    "title": "a_string"
                }
            },
            "required": [
                "an_int"
            ]
        }
    },
    "properties": {
        "Foo": {
            "$ref": "#/definitions/Foo"
        },
        "MyUnion": {
            "$ref": "#/definitions/MyUnion"
        },
        "MyEnum": {
            "$ref": "#/definitions/MyEnum"
        },
        "Stuff": {
            "$ref": "#/definitions/Stuff"
        },
        "MoreStuff": {
            "$ref": "#/definitions/MoreStuff"
        },
        "InputType": {
            "$ref": "#/definitions/InputType"
        }
    },
    "required": [
        "Foo",
        "MyUnion",
        "MyEnum",
        "Stuff",
        "MoreStuff",
        "InputType"
    ]
}