{

"components": {
  "schemas": {
    "request": {
      "post": {
        "type": "object",
        "xml": { "name": "/" },
        "properties": {
          "purchase": {
            "type": "object",
            "required": ["name"],
            "properties": { "$ref": "purchase.json#/components/schemas/request_properties" }
          }
        }
      },
      "put": {
        "type": "object",
        "xml": { "name": "/" },
        "properties": {
          "purchase": {
            "type": "object",
            "properties": { "$ref": "purchase.json#/components/schemas/request_properties" }
          }
        }
      }
    },
    "request_properties": {
      "number": { "$ref": "../../components.json#/components/common/schemas/number_or_string" },
      "date": { "type": "string", "example": "Jan 01, 2025" },
      "recurrence": { "type": "string", "example": "Monthly" },
      "total_cost": { "$ref": "../../components.json#/components/common/schemas/number_or_string" },
      "currency": { "type": "string", "example": "USD" },
      "notes": { "type": "string", "example": "Purchase notes" },
      "vendor": { "$ref": "../../components.json#/components/request/schemas/association_by_name" }
    },
    "response": {
      "type": "object",
      "xml": { "name": "/", "wrapped": true },
      "properties": {
        "purchase": {
          "type": "object",
          "properties": {
            "id": { "$ref": "../../components.json#/components/response/schemas/id" },
            "number": { "type": "string", "example": "1" },
            "date": { "type": "string", "example": "Jan 01, 2025" },
            "recurrence": { "type": "string", "example": "Monthly" },
            "total_cost": { "type": "string", "example": "1" },
            "currency": { "type": "string", "example": "USD" },
            "notes": { "type": "string", "example": "Purchase notes" },
            "vendor": { "$ref": "../../components.json#/components/response/schemas/vendor" }
          }
        }
      }
    }
  }
}

}