{

"components": {
  "schemas": {
    "request": {
      "post": {
        "type": "object",
        "xml": { "name": "/" },
        "properties": {
          "catalog_item": {
            "type": "object",
            "required": ["name", "category"],
            "properties": { "$ref": "catalog_item.json#/components/schemas/request_properties" }
          }
        }
      },
      "put": {
        "type": "object",
        "xml": { "name": "/" },
        "properties": {
          "catalog_item": {
            "type": "object",
            "properties": { "$ref": "catalog_item.json#/components/schemas/request_properties" }
          }
        }
      }
    },
    "request_properties": {
      "name": { "type": "string", "example": "CI Name" },
      "site_id": { "$ref": "../../components.json#/components/common/schemas/association_by_id" },
      "department_id": { "$ref": "../../components.json#/components/common/schemas/association_by_id" },
      "description": { "type": "string", "example": "description" },
      "state": { "type": "string", "example": "Approved" },
      "default_assignee_id": { "$ref": "../../components.json#/components/common/schemas/association_by_id" },
      "category": { "$ref": "../../components.json#/components/request/schemas/association_by_name" },
      "subcategory": { "$ref": "../../components.json#/components/request/schemas/association_by_name" },
      "expected_delivery_time": { "type": "string", "example": "1 day" },
      "currency": { "type": "string", "example": "USD" },
      "price": { "$ref": "../../components.json#/components/common/schemas/number_or_string" },
      "show_price": { "anyOf": [{ "type": "string", "example": "1" }, { "type": "boolean", "example": true }] },
      "add_to_tag_list": { "type": "string", "example": "tag1, tag2" },
      "remove_from_tag_list": { "type": "string", "example": "tag3" },
      "tag_list": { "type": "string", "example": "tag1, tag2" }
    },
    "response": {
      "type": "object",
      "xml": { "name": "/", "wrapped": true },
      "properties": {
        "catalog_item": {
          "type": "object",
          "properties": {
            "id": { "$ref": "../../components.json#/components/response/schemas/id" },
            "name": { "type": "string", "example": "CI Name" },
            "description": { "type": "string", "example": "description" },
            "expected_delivery_time": { "type": "string", "example": "1 day" },
            "currency": { "type": "string", "example": "USD" },
            "price": { "type": "string", "example": "1" },
            "show_price": { "type": "boolean", "example": true },
            "created_at": { "type": "string", "example": "2025-01-01T00:00:00.000+01:00" },
            "tags": { "$ref": "../../components.json#/components/response/schemas/tags" },
            "site": { "$ref": "../../components.json#/components/response/schemas/site_response" },
            "department": { "$ref": "../../components.json#/components/response/schemas/department_response" },
            "category": { "$ref": "../../components.json#/components/response/schemas/category_subcategory" },
            "subcategory": { "$ref": "../../components.json#/components/response/schemas/category_subcategory" },
            "origin": { "type": "string", "example": "api" }
          }
        }
      }
    }
  }
}

}