{

"components": {
  "schemas": {
    "request": {
      "post": {
        "type": "object",
        "xml": { "name": "/" },
        "properties": {
          "contract": {
            "type": "object",
            "required": ["name", "manufacturer_name"],
            "properties": { "$ref": "contract.json#/components/schemas/request_properties" }
          }
        }
      },
      "put": {
        "type": "object",
        "xml": { "name": "/" },
        "properties": {
          "contract": {
            "type": "object",
            "properties": { "$ref": "contract.json#/components/schemas/request_properties" }
          }
        }
      }
    },
    "request_properties": {
      "type": { "type": "string", "example": "Software License" },
      "manufacturer_name": { "type": "string", "example": "Apple" },
      "name": { "type": "string", "example": "Contract Name" },
      "note": { "type": "string", "example": "Contract Note" },
      "status": { "type": "string", "example": "Active" },
      "site": { "$ref": "../../components.json#/components/request/schemas/association_by_name" },
      "department": { "$ref": "../../components.json#/components/request/schemas/association_by_name" },
      "custom_fields_values": { "$ref": "../../components.json#/components/request/schemas/custom_fields_values" },
      "custom_fields_values_attributes": { "$ref": "../../components.json#/components/request/schemas/custom_fields_values_attributes" },
      "start_date": { "type": "string", "example": "2020-01-01T00:00:00-00:00" },
      "end_date": { "type": "string", "example": "2030-01-01T00:00:00-00:00" },
      "tag_list": { "type": "string", "example": "tag1, tag2" }
    },
    "response": {
      "type": "object",
      "xml": { "name": "/", "wrapped": true },
      "properties": {
        "contract": {
          "type": "object",
          "properties": {
            "id": { "$ref": "../../components.json#/components/response/schemas/id" },
            "name": { "type": "string", "example": "Contract Name" },
            "type": { "type": "string", "example": "Software License" },
            "manufacturer_name": { "type": "string", "example": "Apple" },
            "note": { "type": "string", "example": "Contract Note" },
            "status": { "type": "string", "example": "Active" },
            "site": { "$ref": "../../components.json#/components/response/schemas/site_response" },
            "department": { "$ref": "../../components.json#/components/response/schemas/department_response" },
            "custom_fields_values": { "$ref": "../../components.json#/components/response/schemas/custom_fields_values" },
            "start_date": { "type": "string", "example": "2020-01-01T00:00:00-00:00" },
            "end_date": { "type": "string", "example": "2030-01-01T00:00:00-00:00" },
            "tags": { "$ref": "../../components.json#/components/response/schemas/tags" },
            "items": { "$ref": "../../components.json#/components/response/schemas/procurement_items" }
          }
        }
      }
    }
  }
}

}