{
  "id": "/fixtures/foo",
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "title": "Foo Object",
  "description": "The foo object is bar",

  "definitions": {
    "identifier": {
      "type": "number",
      "description": "Foo ID",
      "example": 123
    },
    "foo_prop": {
      "type": "string",
      "description": "Foo property",
      "example": "bar"
    },
    "baz_prop": {
      "$ref": "/fixtures/baz#/definitions/baz_prop"
    },
    "object_one": {
      "type": "object",
      "description": "Object 1",
      "properties": {
        "attribute_one": {
          "type": "string",
          "description": "Attribute 1",
          "example": "One"
        }
      }
    },
    "object_two": {
      "type": "object",
      "description": "Object 2",
      "properties": {
        "attribute_two": {
          "type": "string",
          "description": "Attribute 2",
          "example": "Two"
        }
      }
    }
  },

  "properties": {
    "ID": {
      "$ref": "#/definitions/identifier"
    },
    "foo": {
      "$ref": "#/definitions/foo_prop"
    },
    "baz": {
      "$ref": "#/definitions/baz_prop"
    },
    "boo": {
      "type": "object",
      "oneOf": [
        {"$ref": "#/definitions/object_one"},
        {"$ref": "#/definitions/object_two"}
      ]
    },
    "option": {
      "type": "object",
      "anyOf": [
        {"$ref": "#/definitions/object_two"},
        {"$ref": "#/definitions/object_one"}
      ]
    },
    "composite": {
      "allOf": [
        {"$ref": "#/definitions/object_one"},
        {"$ref": "#/definitions/object_two"}
      ]
    },
    "nested_object": {
      "$ref": "/fixtures/baz"
    },
    "array_prop": {
      "type": "array",
      "description": "Some array property description",
      "items": {
        "$ref": "#/definitions/foo_prop"
      }
    }
  },

  "additionalProperties": {
    "plus_one": {
      "$ref": "#/definitions/foo_prop"
    }
  },

  "generator": {
    "includeAdditionalProperties": true
  },

  "links": [
    {
      "title": "Get all foos",
      "href": "/fixtures/foos",
      "method": "GET",
      "schema": {
        "type": "object",
        "description": "Queriable properties",
        "properties": {
          "foo": {
            "$ref": "#/definitions/foo_prop"
          }
        }
      },
      "targetSchema": {
        "rel": "self"
      }
    },
    {
      "title": "Get a single foo",
      "href": "/fixtures/foos/{#/definitions/identifier}",
      "method": "GET",
      "targetSchema": {
        "rel": "self"
      }
    },
    {
      "title": "Create a foo",
      "href": "/fixtures/foos",
      "method": "POST",
      "schema": {
        "type": "object",
        "required": ["foo", "baz"],
        "properties": {
          "foo": "#/definitions/foo_prop",
          "baz": "#/definitions/baz_prop",
          "boo": {
            "oneOf": [
              {"$ref": "#/definitions/object_one"},
              {"$ref": "#/definitions/object_two"}
            ]
          }
        }
      },
      "targetSchema": {
        "rel": "self"
      }
    }
  ]
}
