{
  "openapi": "3.1.0",
  "info": {
    "title": "Workbase API v1",
    "version": "1.0.0",
    "description": "JSON API for Workbase Admin and Storefront"
  },
  "servers": [
    {
      "url": "/api/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "cookieAuth": []
    }
  ],
  "components": {
    "schemas": {
      "ApiErrorEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "null"
          },
          "meta": {
            "type": "null"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "VALIDATION_ERROR",
                  "UNAUTHORIZED",
                  "FORBIDDEN",
                  "NOT_FOUND",
                  "CONFLICT",
                  "RATE_LIMITED",
                  "SERVER_ERROR",
                  "PRECONDITION_FAILED"
                ]
              },
              "message": {
                "type": "string"
              },
              "fields": {
                "type": "object",
                "properties": {},
                "additionalProperties": {
                  "type": "string"
                }
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "data",
          "error"
        ]
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "name": {
            "type": "string"
          },
          "article": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "quantity": {
            "type": "integer"
          },
          "minQty": {
            "type": "integer"
          },
          "subtract": {
            "type": "boolean"
          },
          "status": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          },
          "manufacturerId": {
            "type": [
              "string",
              "null"
            ],
            "format": "cuid"
          },
          "countryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplierCounterpartyId": {
            "type": [
              "string",
              "null"
            ],
            "format": "cuid"
          },
          "lastSynced": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "manufacturer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "cuid"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "website": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              },
              "supportEmail": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "email"
              },
              "supportPhone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sortOrder": {
                "type": "integer"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "name",
              "slug",
              "website",
              "supportEmail",
              "supportPhone",
              "description",
              "sortOrder",
              "createdAt",
              "updatedAt"
            ]
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "type": "string",
                  "format": "cuid"
                },
                "categoryId": {
                  "type": "string",
                  "format": "cuid"
                },
                "category": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "cuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "cuid"
                    },
                    "sortOrder": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "description",
                    "parentId",
                    "sortOrder",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              },
              "required": [
                "productId",
                "categoryId"
              ]
            }
          },
          "images": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "cuid"
                },
                "productId": {
                  "type": "string",
                  "format": "cuid"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "sortOrder": {
                  "type": "integer",
                  "minimum": 0
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "productId",
                "url",
                "sortOrder",
                "createdAt",
                "updatedAt"
              ]
            }
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "cuid"
                },
                "productId": {
                  "type": "string",
                  "format": "cuid"
                },
                "optionId": {
                  "type": "string",
                  "format": "cuid"
                },
                "isRequired": {
                  "type": "boolean"
                },
                "sortOrder": {
                  "type": "integer",
                  "minimum": 0
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "option": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "cuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "TABLE",
                        "RADIO",
                        "CHECKBOX",
                        "SELECT",
                        "MATRIX"
                      ]
                    },
                    "sortOrder": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "cuid"
                          },
                          "optionId": {
                            "type": "string",
                            "format": "cuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "imageUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sortOrder": {
                            "type": "integer"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "optionId",
                          "name",
                          "slug",
                          "imageUrl",
                          "description",
                          "sortOrder",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "description",
                    "type",
                    "sortOrder",
                    "createdAt",
                    "updatedAt"
                  ]
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "cuid"
                      },
                      "productOptionId": {
                        "type": "string",
                        "format": "cuid"
                      },
                      "optionValueId": {
                        "type": "string",
                        "format": "cuid"
                      },
                      "externalCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "code": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "stock": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "subtract": {
                        "type": "boolean"
                      },
                      "sortOrder": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "priceDelta": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "optionValue": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "cuid"
                          },
                          "optionId": {
                            "type": "string",
                            "format": "cuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "imageUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sortOrder": {
                            "type": "integer"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "optionId",
                          "name",
                          "slug",
                          "imageUrl",
                          "description",
                          "sortOrder",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "tiers": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "productOptionValueId": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "qtyMin": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "price": {
                              "type": "number"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "productOptionValueId",
                            "qtyMin",
                            "price",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "productOptionId",
                      "optionValueId",
                      "stock",
                      "subtract",
                      "sortOrder",
                      "priceDelta",
                      "createdAt",
                      "updatedAt"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "productId",
                "optionId",
                "isRequired",
                "sortOrder",
                "createdAt",
                "updatedAt"
              ]
            }
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "sku",
          "price",
          "quantity",
          "minQty",
          "subtract",
          "status",
          "sortOrder",
          "manufacturerId",
          "createdAt",
          "updatedAt"
        ]
      },
      "ProductImage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "productId": {
            "type": "string",
            "format": "cuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "productId",
          "url",
          "sortOrder",
          "createdAt",
          "updatedAt"
        ]
      },
      "ProductOption": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "productId": {
            "type": "string",
            "format": "cuid"
          },
          "optionId": {
            "type": "string",
            "format": "cuid"
          },
          "isRequired": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "option": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "cuid"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "TABLE",
                  "RADIO",
                  "CHECKBOX",
                  "SELECT",
                  "MATRIX"
                ]
              },
              "sortOrder": {
                "type": "integer"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "values": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "cuid"
                    },
                    "optionId": {
                      "type": "string",
                      "format": "cuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "imageUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uri"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sortOrder": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "optionId",
                    "name",
                    "slug",
                    "imageUrl",
                    "description",
                    "sortOrder",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            },
            "required": [
              "id",
              "name",
              "slug",
              "description",
              "type",
              "sortOrder",
              "createdAt",
              "updatedAt"
            ]
          },
          "values": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "cuid"
                },
                "productOptionId": {
                  "type": "string",
                  "format": "cuid"
                },
                "optionValueId": {
                  "type": "string",
                  "format": "cuid"
                },
                "externalCode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stock": {
                  "type": "integer",
                  "minimum": 0
                },
                "subtract": {
                  "type": "boolean"
                },
                "sortOrder": {
                  "type": "integer",
                  "minimum": 0
                },
                "priceDelta": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "optionValue": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "cuid"
                    },
                    "optionId": {
                      "type": "string",
                      "format": "cuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "imageUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uri"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sortOrder": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "optionId",
                    "name",
                    "slug",
                    "imageUrl",
                    "description",
                    "sortOrder",
                    "createdAt",
                    "updatedAt"
                  ]
                },
                "tiers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "cuid"
                      },
                      "productOptionValueId": {
                        "type": "string",
                        "format": "cuid"
                      },
                      "qtyMin": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "price": {
                        "type": "number"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "productOptionValueId",
                      "qtyMin",
                      "price",
                      "createdAt",
                      "updatedAt"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "productOptionId",
                "optionValueId",
                "stock",
                "subtract",
                "sortOrder",
                "priceDelta",
                "createdAt",
                "updatedAt"
              ]
            }
          }
        },
        "required": [
          "id",
          "productId",
          "optionId",
          "isRequired",
          "sortOrder",
          "createdAt",
          "updatedAt"
        ]
      },
      "ProductOptionValue": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "productOptionId": {
            "type": "string",
            "format": "cuid"
          },
          "optionValueId": {
            "type": "string",
            "format": "cuid"
          },
          "externalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "stock": {
            "type": "integer",
            "minimum": 0
          },
          "subtract": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0
          },
          "priceDelta": {
            "type": [
              "number",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "optionValue": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "cuid"
              },
              "optionId": {
                "type": "string",
                "format": "cuid"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "imageUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sortOrder": {
                "type": "integer"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "optionId",
              "name",
              "slug",
              "imageUrl",
              "description",
              "sortOrder",
              "createdAt",
              "updatedAt"
            ]
          },
          "tiers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "cuid"
                },
                "productOptionValueId": {
                  "type": "string",
                  "format": "cuid"
                },
                "qtyMin": {
                  "type": "integer",
                  "minimum": 1
                },
                "price": {
                  "type": "number"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "productOptionValueId",
                "qtyMin",
                "price",
                "createdAt",
                "updatedAt"
              ]
            }
          }
        },
        "required": [
          "id",
          "productOptionId",
          "optionValueId",
          "stock",
          "subtract",
          "sortOrder",
          "priceDelta",
          "createdAt",
          "updatedAt"
        ]
      },
      "ProductCategoryLink": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "format": "cuid"
          },
          "categoryId": {
            "type": "string",
            "format": "cuid"
          },
          "category": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "cuid"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "parentId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "cuid"
              },
              "sortOrder": {
                "type": "integer"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "name",
              "slug",
              "description",
              "parentId",
              "sortOrder",
              "createdAt",
              "updatedAt"
            ]
          }
        },
        "required": [
          "productId",
          "categoryId"
        ]
      },
      "PriceTier": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "productOptionValueId": {
            "type": "string",
            "format": "cuid"
          },
          "qtyMin": {
            "type": "integer",
            "minimum": 1
          },
          "price": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "productOptionValueId",
          "qtyMin",
          "price",
          "createdAt",
          "updatedAt"
        ]
      },
      "Category": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "parentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "cuid"
          },
          "sortOrder": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "parent": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "cuid"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "parentId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "cuid"
              },
              "sortOrder": {
                "type": "integer"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "name",
              "slug",
              "description",
              "parentId",
              "sortOrder",
              "createdAt",
              "updatedAt"
            ]
          },
          "children": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "cuid"
                },
                "name": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "parentId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "cuid"
                },
                "sortOrder": {
                  "type": "integer"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "name",
                "slug",
                "description",
                "parentId",
                "sortOrder",
                "createdAt",
                "updatedAt"
              ]
            }
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "description",
          "parentId",
          "sortOrder",
          "createdAt",
          "updatedAt"
        ]
      },
      "Manufacturer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "website": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "supportEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "supportPhone": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "sortOrder": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "website",
          "supportEmail",
          "supportPhone",
          "description",
          "sortOrder",
          "createdAt",
          "updatedAt"
        ]
      },
      "Option": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "TABLE",
              "RADIO",
              "CHECKBOX",
              "SELECT",
              "MATRIX"
            ]
          },
          "sortOrder": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "values": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "cuid"
                },
                "optionId": {
                  "type": "string",
                  "format": "cuid"
                },
                "name": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "imageUrl": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uri"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sortOrder": {
                  "type": "integer"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "optionId",
                "name",
                "slug",
                "imageUrl",
                "description",
                "sortOrder",
                "createdAt",
                "updatedAt"
              ]
            }
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "description",
          "type",
          "sortOrder",
          "createdAt",
          "updatedAt"
        ]
      },
      "OptionValue": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "optionId": {
            "type": "string",
            "format": "cuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "sortOrder": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "optionId",
          "name",
          "slug",
          "imageUrl",
          "description",
          "sortOrder",
          "createdAt",
          "updatedAt"
        ]
      },
      "PricingBreakdownItem": {
        "type": "object",
        "properties": {
          "optionId": {
            "type": "string",
            "format": "cuid"
          },
          "label": {
            "type": "string"
          },
          "delta": {
            "type": "number"
          }
        },
        "required": [
          "optionId",
          "label",
          "delta"
        ]
      },
      "PricingPreviewOutput": {
        "type": "object",
        "properties": {
          "unitPrice": {
            "type": "number"
          },
          "lineTotal": {
            "type": "number"
          },
          "breakdown": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "optionId": {
                  "type": "string",
                  "format": "cuid"
                },
                "label": {
                  "type": "string"
                },
                "delta": {
                  "type": "number"
                }
              },
              "required": [
                "optionId",
                "label",
                "delta"
              ]
            }
          }
        },
        "required": [
          "unitPrice",
          "lineTotal",
          "breakdown"
        ]
      },
      "UploadResult": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "relativePath": {
            "type": "string"
          },
          "originalName": {
            "type": "string"
          },
          "storedName": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "minimum": 0
          },
          "mime": {
            "type": "string"
          },
          "group": {
            "type": "string",
            "enum": [
              "products",
              "categories",
              "other",
              "misc"
            ]
          }
        },
        "required": [
          "url",
          "relativePath",
          "originalName",
          "storedName",
          "size",
          "mime",
          "group"
        ]
      },
      "Country": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "isSystem": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "code2": {
            "type": [
              "string",
              "null"
            ]
          },
          "code3": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "isSystem",
          "name",
          "description",
          "code",
          "code2",
          "code3",
          "createdAt",
          "updatedAt"
        ]
      },
      "Counterparty": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "actualAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "companyType": {
            "type": [
              "string",
              "null"
            ]
          },
          "tin": {
            "type": [
              "string",
              "null"
            ]
          },
          "legalLastName": {
            "type": [
              "string",
              "null"
            ]
          },
          "legalFirstName": {
            "type": [
              "string",
              "null"
            ]
          },
          "legalMiddleName": {
            "type": [
              "string",
              "null"
            ]
          },
          "legalAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "phone",
          "email",
          "actualAddress",
          "description",
          "code",
          "externalCode",
          "tin",
          "legalLastName",
          "legalFirstName",
          "legalMiddleName",
          "legalAddress",
          "createdAt",
          "updatedAt"
        ]
      },
      "Currency": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "shortName": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "numericCode": {
            "type": "string"
          },
          "alphaCode": {
            "type": "string"
          },
          "rate": {
            "type": "string"
          },
          "isAccounting": {
            "type": "boolean"
          },
          "isEnabled": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "shortName",
          "name",
          "numericCode",
          "alphaCode",
          "rate",
          "isAccounting",
          "isEnabled",
          "sortOrder",
          "createdAt",
          "updatedAt"
        ]
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "companyId": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string"
          },
          "customerName": {
            "type": "string"
          },
          "customerPhone": {
            "type": [
              "string",
              "null"
            ]
          },
          "customerEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "shippingAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "comment": {
            "type": [
              "string",
              "null"
            ]
          },
          "currencyCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "subtotal": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "cuid"
                },
                "orderId": {
                  "type": "string",
                  "format": "cuid"
                },
                "productId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "cuid"
                },
                "productName": {
                  "type": "string"
                },
                "productCode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": "integer"
                },
                "unitPrice": {
                  "type": "string"
                },
                "lineTotal": {
                  "type": "string"
                },
                "sortOrder": {
                  "type": "integer"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "options": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "cuid"
                      },
                      "orderItemId": {
                        "type": "string",
                        "format": "cuid"
                      },
                      "optionName": {
                        "type": "string"
                      },
                      "optionValueName": {
                        "type": "string"
                      },
                      "pricePrefix": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "priceValue": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "orderItemId",
                      "optionName",
                      "optionValueName",
                      "pricePrefix",
                      "createdAt"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "orderId",
                "productId",
                "productName",
                "productCode",
                "quantity",
                "unitPrice",
                "lineTotal",
                "sortOrder",
                "createdAt"
              ]
            }
          },
          "itemsCount": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "companyId",
          "status",
          "customerName",
          "customerPhone",
          "customerEmail",
          "shippingAddress",
          "comment",
          "currencyCode",
          "subtotal",
          "total",
          "createdAt",
          "updatedAt"
        ]
      },
      "SystemCompany": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "usersCount": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "createdAt",
          "updatedAt"
        ]
      },
      "SystemUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "role": {
            "type": "string"
          },
          "companyId": {
            "type": "string",
            "minLength": 1
          },
          "company": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "slug"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "role",
          "createdAt",
          "updatedAt"
        ]
      },
      "FileAsset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "cuid"
          },
          "group": {
            "type": "string",
            "enum": [
              "PRODUCTS",
              "CATEGORIES",
              "OTHER"
            ]
          },
          "entityType": {
            "type": "string",
            "enum": [
              "PRODUCT",
              "CATEGORY",
              "STOREFRONT_PAGE"
            ]
          },
          "entityId": {
            "type": "string",
            "minLength": 1
          },
          "originalName": {
            "type": "string"
          },
          "storedName": {
            "type": "string"
          },
          "relativePath": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "locationHref": {
            "type": [
              "string",
              "null"
            ]
          },
          "locationLabel": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "group",
          "entityType",
          "entityId",
          "originalName",
          "storedName",
          "relativePath",
          "mimeType",
          "sizeBytes",
          "createdAt",
          "updatedAt",
          "url",
          "locationHref",
          "locationLabel"
        ]
      },
      "FileAssetListData": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "cuid"
                },
                "group": {
                  "type": "string",
                  "enum": [
                    "PRODUCTS",
                    "CATEGORIES",
                    "OTHER"
                  ]
                },
                "entityType": {
                  "type": "string",
                  "enum": [
                    "PRODUCT",
                    "CATEGORY",
                    "STOREFRONT_PAGE"
                  ]
                },
                "entityId": {
                  "type": "string",
                  "minLength": 1
                },
                "originalName": {
                  "type": "string"
                },
                "storedName": {
                  "type": "string"
                },
                "relativePath": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "sizeBytes": {
                  "type": "integer",
                  "minimum": 0
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uri"
                },
                "locationHref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "locationLabel": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "group",
                "entityType",
                "entityId",
                "originalName",
                "storedName",
                "relativePath",
                "mimeType",
                "sizeBytes",
                "createdAt",
                "updatedAt",
                "url",
                "locationHref",
                "locationLabel"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1
          },
          "pageCount": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "pageSize",
          "pageCount"
        ]
      },
      "AccountChangeNameResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "ok",
          "name"
        ]
      },
      "AccountChangeEmailResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "email": {
            "type": "string",
            "format": "email"
          }
        },
        "required": [
          "ok",
          "email"
        ]
      },
      "AccountChangeCompanyNameResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "name"
        ]
      },
      "AccountOperationResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    "parameters": {},
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key"
      },
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "next-auth.session-token"
      }
    }
  },
  "paths": {
    "/api/v1/health": {
      "get": {
        "summary": "Health check",
        "tags": [
          "Health"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "API health status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products": {
      "get": {
        "summary": "List products",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number (1-based)"
            },
            "required": false,
            "description": "Page number (1-based)",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Number of records per page"
            },
            "required": false,
            "description": "Number of records per page",
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_]+:(asc|desc)$"
            },
            "required": false,
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "string",
                  "enum": [
                    ""
                  ]
                }
              ]
            },
            "required": false,
            "name": "manufacturerId",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "string",
                  "enum": [
                    ""
                  ]
                }
              ]
            },
            "required": false,
            "name": "categoryId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1",
                "true",
                "false"
              ],
              "description": "Filter by product status (true/false)"
            },
            "required": false,
            "description": "Filter by product status (true/false)",
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated product list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "cuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "article": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "externalCode": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sku": {
                            "type": "string"
                          },
                          "price": {
                            "type": "number"
                          },
                          "quantity": {
                            "type": "integer"
                          },
                          "minQty": {
                            "type": "integer"
                          },
                          "subtract": {
                            "type": "boolean"
                          },
                          "status": {
                            "type": "boolean"
                          },
                          "sortOrder": {
                            "type": "integer"
                          },
                          "manufacturerId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "cuid"
                          },
                          "countryId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "supplierCounterpartyId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "cuid"
                          },
                          "lastSynced": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "manufacturer": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "website": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uri"
                              },
                              "supportEmail": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "email"
                              },
                              "supportPhone": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "sortOrder": {
                                "type": "integer"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "slug",
                              "website",
                              "supportEmail",
                              "supportPhone",
                              "description",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          },
                          "categories": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "format": "cuid"
                                },
                                "categoryId": {
                                  "type": "string",
                                  "format": "cuid"
                                },
                                "category": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "slug": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "parentId": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "format": "cuid"
                                    },
                                    "sortOrder": {
                                      "type": "integer"
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "updatedAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "slug",
                                    "description",
                                    "parentId",
                                    "sortOrder",
                                    "createdAt",
                                    "updatedAt"
                                  ]
                                }
                              },
                              "required": [
                                "productId",
                                "categoryId"
                              ]
                            }
                          },
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "cuid"
                                },
                                "productId": {
                                  "type": "string",
                                  "format": "cuid"
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "sortOrder": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "id",
                                "productId",
                                "url",
                                "sortOrder",
                                "createdAt",
                                "updatedAt"
                              ]
                            }
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "cuid"
                                },
                                "productId": {
                                  "type": "string",
                                  "format": "cuid"
                                },
                                "optionId": {
                                  "type": "string",
                                  "format": "cuid"
                                },
                                "isRequired": {
                                  "type": "boolean"
                                },
                                "sortOrder": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "option": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "slug": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "TABLE",
                                        "RADIO",
                                        "CHECKBOX",
                                        "SELECT",
                                        "MATRIX"
                                      ]
                                    },
                                    "sortOrder": {
                                      "type": "integer"
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "updatedAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "values": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "cuid"
                                          },
                                          "optionId": {
                                            "type": "string",
                                            "format": "cuid"
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "slug": {
                                            "type": "string"
                                          },
                                          "imageUrl": {
                                            "type": [
                                              "string",
                                              "null"
                                            ],
                                            "format": "uri"
                                          },
                                          "description": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "sortOrder": {
                                            "type": "integer"
                                          },
                                          "createdAt": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "updatedAt": {
                                            "type": "string",
                                            "format": "date-time"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "optionId",
                                          "name",
                                          "slug",
                                          "imageUrl",
                                          "description",
                                          "sortOrder",
                                          "createdAt",
                                          "updatedAt"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "slug",
                                    "description",
                                    "type",
                                    "sortOrder",
                                    "createdAt",
                                    "updatedAt"
                                  ]
                                },
                                "values": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "format": "cuid"
                                      },
                                      "productOptionId": {
                                        "type": "string",
                                        "format": "cuid"
                                      },
                                      "optionValueId": {
                                        "type": "string",
                                        "format": "cuid"
                                      },
                                      "externalCode": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "code": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "stock": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "subtract": {
                                        "type": "boolean"
                                      },
                                      "sortOrder": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "priceDelta": {
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "createdAt": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "updatedAt": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "optionValue": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "cuid"
                                          },
                                          "optionId": {
                                            "type": "string",
                                            "format": "cuid"
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "slug": {
                                            "type": "string"
                                          },
                                          "imageUrl": {
                                            "type": [
                                              "string",
                                              "null"
                                            ],
                                            "format": "uri"
                                          },
                                          "description": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "sortOrder": {
                                            "type": "integer"
                                          },
                                          "createdAt": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "updatedAt": {
                                            "type": "string",
                                            "format": "date-time"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "optionId",
                                          "name",
                                          "slug",
                                          "imageUrl",
                                          "description",
                                          "sortOrder",
                                          "createdAt",
                                          "updatedAt"
                                        ]
                                      },
                                      "tiers": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string",
                                              "format": "cuid"
                                            },
                                            "productOptionValueId": {
                                              "type": "string",
                                              "format": "cuid"
                                            },
                                            "qtyMin": {
                                              "type": "integer",
                                              "minimum": 1
                                            },
                                            "price": {
                                              "type": "number"
                                            },
                                            "createdAt": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "updatedAt": {
                                              "type": "string",
                                              "format": "date-time"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "productOptionValueId",
                                            "qtyMin",
                                            "price",
                                            "createdAt",
                                            "updatedAt"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "productOptionId",
                                      "optionValueId",
                                      "stock",
                                      "subtract",
                                      "sortOrder",
                                      "priceDelta",
                                      "createdAt",
                                      "updatedAt"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "id",
                                "productId",
                                "optionId",
                                "isRequired",
                                "sortOrder",
                                "createdAt",
                                "updatedAt"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "sku",
                          "price",
                          "quantity",
                          "minQty",
                          "subtract",
                          "status",
                          "sortOrder",
                          "manufacturerId",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create product",
        "tags": [
          "Products"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sku": {
                    "type": "string",
                    "minLength": 1
                  },
                  "article": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "code": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "externalCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "price": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "quantity": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "minQty": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "subtract": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": false
                  },
                  "status": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": true
                  },
                  "sortOrder": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": 0
                  },
                  "manufacturerId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "countryId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "supplierCounterpartyId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "sku",
                  "price",
                  "quantity",
                  "minQty"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created product",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "article": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "externalCode": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sku": {
                          "type": "string"
                        },
                        "price": {
                          "type": "number"
                        },
                        "quantity": {
                          "type": "integer"
                        },
                        "minQty": {
                          "type": "integer"
                        },
                        "subtract": {
                          "type": "boolean"
                        },
                        "status": {
                          "type": "boolean"
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "manufacturerId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "cuid"
                        },
                        "countryId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "supplierCounterpartyId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "cuid"
                        },
                        "lastSynced": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "manufacturer": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "website": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri"
                            },
                            "supportEmail": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "email"
                            },
                            "supportPhone": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "website",
                            "supportEmail",
                            "supportPhone",
                            "description",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        },
                        "categories": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "productId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "categoryId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "category": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "parentId": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "cuid"
                                  },
                                  "sortOrder": {
                                    "type": "integer"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "slug",
                                  "description",
                                  "parentId",
                                  "sortOrder",
                                  "createdAt",
                                  "updatedAt"
                                ]
                              }
                            },
                            "required": [
                              "productId",
                              "categoryId"
                            ]
                          }
                        },
                        "images": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "productId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "url": {
                                "type": "string",
                                "format": "uri"
                              },
                              "sortOrder": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "productId",
                              "url",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "productId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "optionId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "isRequired": {
                                "type": "boolean"
                              },
                              "sortOrder": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "option": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "TABLE",
                                      "RADIO",
                                      "CHECKBOX",
                                      "SELECT",
                                      "MATRIX"
                                    ]
                                  },
                                  "sortOrder": {
                                    "type": "integer"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "values": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "cuid"
                                        },
                                        "optionId": {
                                          "type": "string",
                                          "format": "cuid"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "slug": {
                                          "type": "string"
                                        },
                                        "imageUrl": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "format": "uri"
                                        },
                                        "description": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "sortOrder": {
                                          "type": "integer"
                                        },
                                        "createdAt": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "updatedAt": {
                                          "type": "string",
                                          "format": "date-time"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "optionId",
                                        "name",
                                        "slug",
                                        "imageUrl",
                                        "description",
                                        "sortOrder",
                                        "createdAt",
                                        "updatedAt"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "slug",
                                  "description",
                                  "type",
                                  "sortOrder",
                                  "createdAt",
                                  "updatedAt"
                                ]
                              },
                              "values": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "productOptionId": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "optionValueId": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "externalCode": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "code": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "stock": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "subtract": {
                                      "type": "boolean"
                                    },
                                    "sortOrder": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "priceDelta": {
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "updatedAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "optionValue": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "cuid"
                                        },
                                        "optionId": {
                                          "type": "string",
                                          "format": "cuid"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "slug": {
                                          "type": "string"
                                        },
                                        "imageUrl": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "format": "uri"
                                        },
                                        "description": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "sortOrder": {
                                          "type": "integer"
                                        },
                                        "createdAt": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "updatedAt": {
                                          "type": "string",
                                          "format": "date-time"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "optionId",
                                        "name",
                                        "slug",
                                        "imageUrl",
                                        "description",
                                        "sortOrder",
                                        "createdAt",
                                        "updatedAt"
                                      ]
                                    },
                                    "tiers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "cuid"
                                          },
                                          "productOptionValueId": {
                                            "type": "string",
                                            "format": "cuid"
                                          },
                                          "qtyMin": {
                                            "type": "integer",
                                            "minimum": 1
                                          },
                                          "price": {
                                            "type": "number"
                                          },
                                          "createdAt": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "updatedAt": {
                                            "type": "string",
                                            "format": "date-time"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "productOptionValueId",
                                          "qtyMin",
                                          "price",
                                          "createdAt",
                                          "updatedAt"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "productOptionId",
                                    "optionValueId",
                                    "stock",
                                    "subtract",
                                    "sortOrder",
                                    "priceDelta",
                                    "createdAt",
                                    "updatedAt"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "productId",
                              "optionId",
                              "isRequired",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "description",
                        "sku",
                        "price",
                        "quantity",
                        "minQty",
                        "subtract",
                        "status",
                        "sortOrder",
                        "manufacturerId",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{id}": {
      "get": {
        "summary": "Get product",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Product details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "article": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "externalCode": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sku": {
                          "type": "string"
                        },
                        "price": {
                          "type": "number"
                        },
                        "quantity": {
                          "type": "integer"
                        },
                        "minQty": {
                          "type": "integer"
                        },
                        "subtract": {
                          "type": "boolean"
                        },
                        "status": {
                          "type": "boolean"
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "manufacturerId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "cuid"
                        },
                        "countryId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "supplierCounterpartyId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "cuid"
                        },
                        "lastSynced": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "manufacturer": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "website": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri"
                            },
                            "supportEmail": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "email"
                            },
                            "supportPhone": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "website",
                            "supportEmail",
                            "supportPhone",
                            "description",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        },
                        "categories": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "productId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "categoryId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "category": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "parentId": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "cuid"
                                  },
                                  "sortOrder": {
                                    "type": "integer"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "slug",
                                  "description",
                                  "parentId",
                                  "sortOrder",
                                  "createdAt",
                                  "updatedAt"
                                ]
                              }
                            },
                            "required": [
                              "productId",
                              "categoryId"
                            ]
                          }
                        },
                        "images": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "productId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "url": {
                                "type": "string",
                                "format": "uri"
                              },
                              "sortOrder": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "productId",
                              "url",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "productId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "optionId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "isRequired": {
                                "type": "boolean"
                              },
                              "sortOrder": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "option": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "TABLE",
                                      "RADIO",
                                      "CHECKBOX",
                                      "SELECT",
                                      "MATRIX"
                                    ]
                                  },
                                  "sortOrder": {
                                    "type": "integer"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "values": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "cuid"
                                        },
                                        "optionId": {
                                          "type": "string",
                                          "format": "cuid"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "slug": {
                                          "type": "string"
                                        },
                                        "imageUrl": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "format": "uri"
                                        },
                                        "description": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "sortOrder": {
                                          "type": "integer"
                                        },
                                        "createdAt": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "updatedAt": {
                                          "type": "string",
                                          "format": "date-time"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "optionId",
                                        "name",
                                        "slug",
                                        "imageUrl",
                                        "description",
                                        "sortOrder",
                                        "createdAt",
                                        "updatedAt"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "slug",
                                  "description",
                                  "type",
                                  "sortOrder",
                                  "createdAt",
                                  "updatedAt"
                                ]
                              },
                              "values": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "productOptionId": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "optionValueId": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "externalCode": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "code": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "stock": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "subtract": {
                                      "type": "boolean"
                                    },
                                    "sortOrder": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "priceDelta": {
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "updatedAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "optionValue": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "cuid"
                                        },
                                        "optionId": {
                                          "type": "string",
                                          "format": "cuid"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "slug": {
                                          "type": "string"
                                        },
                                        "imageUrl": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "format": "uri"
                                        },
                                        "description": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "sortOrder": {
                                          "type": "integer"
                                        },
                                        "createdAt": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "updatedAt": {
                                          "type": "string",
                                          "format": "date-time"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "optionId",
                                        "name",
                                        "slug",
                                        "imageUrl",
                                        "description",
                                        "sortOrder",
                                        "createdAt",
                                        "updatedAt"
                                      ]
                                    },
                                    "tiers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "cuid"
                                          },
                                          "productOptionValueId": {
                                            "type": "string",
                                            "format": "cuid"
                                          },
                                          "qtyMin": {
                                            "type": "integer",
                                            "minimum": 1
                                          },
                                          "price": {
                                            "type": "number"
                                          },
                                          "createdAt": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "updatedAt": {
                                            "type": "string",
                                            "format": "date-time"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "productOptionValueId",
                                          "qtyMin",
                                          "price",
                                          "createdAt",
                                          "updatedAt"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "productOptionId",
                                    "optionValueId",
                                    "stock",
                                    "subtract",
                                    "sortOrder",
                                    "priceDelta",
                                    "createdAt",
                                    "updatedAt"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "productId",
                              "optionId",
                              "isRequired",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "description",
                        "sku",
                        "price",
                        "quantity",
                        "minQty",
                        "subtract",
                        "status",
                        "sortOrder",
                        "manufacturerId",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update product",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sku": {
                    "type": "string",
                    "minLength": 1
                  },
                  "article": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "code": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "externalCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "price": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "quantity": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "minQty": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "subtract": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": false
                  },
                  "status": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": true
                  },
                  "sortOrder": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": 0
                  },
                  "manufacturerId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "countryId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "supplierCounterpartyId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "customFields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "fieldId": {
                          "type": "string"
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "fieldId"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated product",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "article": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "externalCode": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sku": {
                          "type": "string"
                        },
                        "price": {
                          "type": "number"
                        },
                        "quantity": {
                          "type": "integer"
                        },
                        "minQty": {
                          "type": "integer"
                        },
                        "subtract": {
                          "type": "boolean"
                        },
                        "status": {
                          "type": "boolean"
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "manufacturerId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "cuid"
                        },
                        "countryId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "supplierCounterpartyId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "cuid"
                        },
                        "lastSynced": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "manufacturer": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "website": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri"
                            },
                            "supportEmail": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "email"
                            },
                            "supportPhone": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "website",
                            "supportEmail",
                            "supportPhone",
                            "description",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        },
                        "categories": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "productId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "categoryId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "category": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "parentId": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "cuid"
                                  },
                                  "sortOrder": {
                                    "type": "integer"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "slug",
                                  "description",
                                  "parentId",
                                  "sortOrder",
                                  "createdAt",
                                  "updatedAt"
                                ]
                              }
                            },
                            "required": [
                              "productId",
                              "categoryId"
                            ]
                          }
                        },
                        "images": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "productId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "url": {
                                "type": "string",
                                "format": "uri"
                              },
                              "sortOrder": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "productId",
                              "url",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "productId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "optionId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "isRequired": {
                                "type": "boolean"
                              },
                              "sortOrder": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "option": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "TABLE",
                                      "RADIO",
                                      "CHECKBOX",
                                      "SELECT",
                                      "MATRIX"
                                    ]
                                  },
                                  "sortOrder": {
                                    "type": "integer"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "values": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "cuid"
                                        },
                                        "optionId": {
                                          "type": "string",
                                          "format": "cuid"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "slug": {
                                          "type": "string"
                                        },
                                        "imageUrl": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "format": "uri"
                                        },
                                        "description": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "sortOrder": {
                                          "type": "integer"
                                        },
                                        "createdAt": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "updatedAt": {
                                          "type": "string",
                                          "format": "date-time"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "optionId",
                                        "name",
                                        "slug",
                                        "imageUrl",
                                        "description",
                                        "sortOrder",
                                        "createdAt",
                                        "updatedAt"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "slug",
                                  "description",
                                  "type",
                                  "sortOrder",
                                  "createdAt",
                                  "updatedAt"
                                ]
                              },
                              "values": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "productOptionId": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "optionValueId": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "externalCode": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "code": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "stock": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "subtract": {
                                      "type": "boolean"
                                    },
                                    "sortOrder": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "priceDelta": {
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "updatedAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "optionValue": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "cuid"
                                        },
                                        "optionId": {
                                          "type": "string",
                                          "format": "cuid"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "slug": {
                                          "type": "string"
                                        },
                                        "imageUrl": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "format": "uri"
                                        },
                                        "description": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "sortOrder": {
                                          "type": "integer"
                                        },
                                        "createdAt": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "updatedAt": {
                                          "type": "string",
                                          "format": "date-time"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "optionId",
                                        "name",
                                        "slug",
                                        "imageUrl",
                                        "description",
                                        "sortOrder",
                                        "createdAt",
                                        "updatedAt"
                                      ]
                                    },
                                    "tiers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "cuid"
                                          },
                                          "productOptionValueId": {
                                            "type": "string",
                                            "format": "cuid"
                                          },
                                          "qtyMin": {
                                            "type": "integer",
                                            "minimum": 1
                                          },
                                          "price": {
                                            "type": "number"
                                          },
                                          "createdAt": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "updatedAt": {
                                            "type": "string",
                                            "format": "date-time"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "productOptionValueId",
                                          "qtyMin",
                                          "price",
                                          "createdAt",
                                          "updatedAt"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "productOptionId",
                                    "optionValueId",
                                    "stock",
                                    "subtract",
                                    "sortOrder",
                                    "priceDelta",
                                    "createdAt",
                                    "updatedAt"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "productId",
                              "optionId",
                              "isRequired",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "description",
                        "sku",
                        "price",
                        "quantity",
                        "minQty",
                        "subtract",
                        "status",
                        "sortOrder",
                        "manufacturerId",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete product",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Product deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{id}/images": {
      "post": {
        "summary": "Upload product image metadata",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "minLength": 1
                  },
                  "originalName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "sortOrder": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created product image",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "productId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "sortOrder": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "productId",
                        "url",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/product-images/{id}": {
      "patch": {
        "summary": "Update product image",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sortOrder": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "sortOrder"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated product image",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "productId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "sortOrder": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "productId",
                        "url",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete product image",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Image deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/categories": {
      "get": {
        "summary": "List categories",
        "tags": [
          "Categories"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number (1-based)"
            },
            "required": false,
            "description": "Page number (1-based)",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Number of records per page"
            },
            "required": false,
            "description": "Number of records per page",
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_]+:(asc|desc)$"
            },
            "required": false,
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "cuid"
                },
                {
                  "type": "string",
                  "enum": [
                    ""
                  ]
                }
              ]
            },
            "required": false,
            "name": "parentId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated category list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "cuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "parentId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "cuid"
                          },
                          "sortOrder": {
                            "type": "integer"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "parent": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "parentId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "cuid"
                              },
                              "sortOrder": {
                                "type": "integer"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "slug",
                              "description",
                              "parentId",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          },
                          "children": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "cuid"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "slug": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "parentId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "cuid"
                                },
                                "sortOrder": {
                                  "type": "integer"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "slug",
                                "description",
                                "parentId",
                                "sortOrder",
                                "createdAt",
                                "updatedAt"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "description",
                          "parentId",
                          "sortOrder",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create category",
        "tags": [
          "Categories"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9-]+$"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "cuid"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "sortOrder": {
                    "type": "integer",
                    "default": 0
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created category",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "parentId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "cuid"
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "parentId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "cuid"
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "description",
                            "parentId",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        },
                        "children": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "parentId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "cuid"
                              },
                              "sortOrder": {
                                "type": "integer"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "slug",
                              "description",
                              "parentId",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug",
                        "description",
                        "parentId",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/categories/{id}": {
      "get": {
        "summary": "Get category",
        "tags": [
          "Categories"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Category details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "parentId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "cuid"
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "parentId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "cuid"
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "description",
                            "parentId",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        },
                        "children": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "parentId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "cuid"
                              },
                              "sortOrder": {
                                "type": "integer"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "slug",
                              "description",
                              "parentId",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug",
                        "description",
                        "parentId",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update category",
        "tags": [
          "Categories"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9-]+$"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "cuid"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "sortOrder": {
                    "type": "integer",
                    "default": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated category",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "parentId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "cuid"
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "parentId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "cuid"
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "description",
                            "parentId",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        },
                        "children": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "parentId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "cuid"
                              },
                              "sortOrder": {
                                "type": "integer"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "slug",
                              "description",
                              "parentId",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug",
                        "description",
                        "parentId",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete category",
        "tags": [
          "Categories"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "boolean",
                "null"
              ],
              "default": false
            },
            "required": false,
            "name": "force",
            "in": "query"
          }
        ],
        "responses": {
          "204": {
            "description": "Category deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{id}/categories": {
      "post": {
        "summary": "Attach category to product",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "categoryId": {
                    "type": "string",
                    "format": "cuid"
                  }
                },
                "required": [
                  "categoryId"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Attached category",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "productId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "categoryId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "category": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "parentId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "cuid"
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "description",
                            "parentId",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "productId",
                        "categoryId"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{id}/categories/{categoryId}": {
      "delete": {
        "summary": "Detach category from product",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "categoryId",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Category detached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{id}/categories/primary/{categoryId}": {
      "patch": {
        "summary": "Set primary category",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "categoryId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Primary category set",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "success"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manufacturers": {
      "get": {
        "summary": "List manufacturers",
        "tags": [
          "Manufacturers"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number (1-based)"
            },
            "required": false,
            "description": "Page number (1-based)",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Number of records per page"
            },
            "required": false,
            "description": "Number of records per page",
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_]+:(asc|desc)$"
            },
            "required": false,
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "q",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated manufacturer list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "cuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "website": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri"
                          },
                          "supportEmail": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "email"
                          },
                          "supportPhone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sortOrder": {
                            "type": "integer"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "website",
                          "supportEmail",
                          "supportPhone",
                          "description",
                          "sortOrder",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create manufacturer",
        "tags": [
          "Manufacturers"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9-]+$"
                  },
                  "website": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "supportEmail": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "email"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "supportPhone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "sortOrder": {
                    "type": "integer",
                    "default": 0
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created manufacturer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "website": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri"
                        },
                        "supportEmail": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "supportPhone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug",
                        "website",
                        "supportEmail",
                        "supportPhone",
                        "description",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manufacturers/{id}": {
      "get": {
        "summary": "Get manufacturer",
        "tags": [
          "Manufacturers"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Manufacturer details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "website": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri"
                        },
                        "supportEmail": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "supportPhone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug",
                        "website",
                        "supportEmail",
                        "supportPhone",
                        "description",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update manufacturer",
        "tags": [
          "Manufacturers"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9-]+$"
                  },
                  "website": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "supportEmail": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "email"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "supportPhone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "sortOrder": {
                    "type": "integer",
                    "default": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated manufacturer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "website": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri"
                        },
                        "supportEmail": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email"
                        },
                        "supportPhone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug",
                        "website",
                        "supportEmail",
                        "supportPhone",
                        "description",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete manufacturer",
        "tags": [
          "Manufacturers"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Manufacturer deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/options": {
      "get": {
        "summary": "List options",
        "tags": [
          "Options"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number (1-based)"
            },
            "required": false,
            "description": "Page number (1-based)",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Number of records per page"
            },
            "required": false,
            "description": "Number of records per page",
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_]+:(asc|desc)$"
            },
            "required": false,
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "q",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated option list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "cuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "TABLE",
                              "RADIO",
                              "CHECKBOX",
                              "SELECT",
                              "MATRIX"
                            ]
                          },
                          "sortOrder": {
                            "type": "integer"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "values": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "cuid"
                                },
                                "optionId": {
                                  "type": "string",
                                  "format": "cuid"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "slug": {
                                  "type": "string"
                                },
                                "imageUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "uri"
                                },
                                "description": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "sortOrder": {
                                  "type": "integer"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "id",
                                "optionId",
                                "name",
                                "slug",
                                "imageUrl",
                                "description",
                                "sortOrder",
                                "createdAt",
                                "updatedAt"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "description",
                          "type",
                          "sortOrder",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create option",
        "tags": [
          "Options"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9-]+$"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "TABLE",
                      "RADIO",
                      "CHECKBOX",
                      "SELECT",
                      "MATRIX"
                    ]
                  },
                  "sortOrder": {
                    "type": "integer",
                    "default": 0
                  }
                },
                "required": [
                  "name",
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "TABLE",
                            "RADIO",
                            "CHECKBOX",
                            "SELECT",
                            "MATRIX"
                          ]
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "optionId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "imageUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uri"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "sortOrder": {
                                "type": "integer"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "optionId",
                              "name",
                              "slug",
                              "imageUrl",
                              "description",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug",
                        "description",
                        "type",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/options/{id}": {
      "get": {
        "summary": "Get option",
        "tags": [
          "Options"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Option details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "TABLE",
                            "RADIO",
                            "CHECKBOX",
                            "SELECT",
                            "MATRIX"
                          ]
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "optionId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "imageUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uri"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "sortOrder": {
                                "type": "integer"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "optionId",
                              "name",
                              "slug",
                              "imageUrl",
                              "description",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug",
                        "description",
                        "type",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update option",
        "tags": [
          "Options"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9-]+$"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "TABLE",
                      "RADIO",
                      "CHECKBOX",
                      "SELECT",
                      "MATRIX"
                    ]
                  },
                  "sortOrder": {
                    "type": "integer",
                    "default": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "TABLE",
                            "RADIO",
                            "CHECKBOX",
                            "SELECT",
                            "MATRIX"
                          ]
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "optionId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "imageUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uri"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "sortOrder": {
                                "type": "integer"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "optionId",
                              "name",
                              "slug",
                              "imageUrl",
                              "description",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug",
                        "description",
                        "type",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete option",
        "tags": [
          "Options"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Option deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/options/{id}/values": {
      "post": {
        "summary": "Create option value",
        "tags": [
          "Options"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9-]+$"
                  },
                  "imageUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "sortOrder": {
                    "type": "integer",
                    "default": 0
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created option value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "optionId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "imageUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "optionId",
                        "name",
                        "slug",
                        "imageUrl",
                        "description",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/option-values/{id}": {
      "patch": {
        "summary": "Update option value",
        "tags": [
          "Options"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9-]+$"
                  },
                  "imageUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "sortOrder": {
                    "type": "integer",
                    "default": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated option value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "optionId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "imageUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "optionId",
                        "name",
                        "slug",
                        "imageUrl",
                        "description",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete option value",
        "tags": [
          "Options"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Option value deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{id}/options": {
      "post": {
        "summary": "Attach option to product",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "optionId": {
                    "type": "string",
                    "format": "cuid"
                  },
                  "isRequired": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": false
                  },
                  "sortOrder": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": 0
                  }
                },
                "required": [
                  "optionId"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Attached product option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "productId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "optionId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "isRequired": {
                          "type": "boolean"
                        },
                        "sortOrder": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "option": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "TABLE",
                                "RADIO",
                                "CHECKBOX",
                                "SELECT",
                                "MATRIX"
                              ]
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "values": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "optionId": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "imageUrl": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "uri"
                                  },
                                  "description": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sortOrder": {
                                    "type": "integer"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                },
                                "required": [
                                  "id",
                                  "optionId",
                                  "name",
                                  "slug",
                                  "imageUrl",
                                  "description",
                                  "sortOrder",
                                  "createdAt",
                                  "updatedAt"
                                ]
                              }
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "description",
                            "type",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "productOptionId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "optionValueId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "externalCode": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "code": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "stock": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "subtract": {
                                "type": "boolean"
                              },
                              "sortOrder": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "priceDelta": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "optionValue": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "optionId": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "imageUrl": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "uri"
                                  },
                                  "description": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sortOrder": {
                                    "type": "integer"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                },
                                "required": [
                                  "id",
                                  "optionId",
                                  "name",
                                  "slug",
                                  "imageUrl",
                                  "description",
                                  "sortOrder",
                                  "createdAt",
                                  "updatedAt"
                                ]
                              },
                              "tiers": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "productOptionValueId": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "qtyMin": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "price": {
                                      "type": "number"
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "updatedAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "productOptionValueId",
                                    "qtyMin",
                                    "price",
                                    "createdAt",
                                    "updatedAt"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "productOptionId",
                              "optionValueId",
                              "stock",
                              "subtract",
                              "sortOrder",
                              "priceDelta",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "productId",
                        "optionId",
                        "isRequired",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{id}/price-matrix": {
      "post": {
        "summary": "Update product price matrix",
        "description": "Replaces all price tiers for a named option and optionally updates surcharge priceDelta values. All changes run in a single transaction. Returns changed:false if data is identical to current state.",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "optionName": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Exact name of the product option whose tiers to replace"
                  },
                  "matrix": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "description": "Map of optionValueName → { minQuantity: price }"
                  },
                  "surcharges": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number",
                      "minimum": 0
                    },
                    "description": "Map of optionValueName → priceDelta to update"
                  }
                },
                "required": [
                  "optionName",
                  "matrix"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Price matrix updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "changed": {
                      "type": "boolean"
                    },
                    "createdOptionValues": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "updatedOptionValues": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "updatedTiersCount": {
                      "type": "integer"
                    },
                    "updatedSurchargesCount": {
                      "type": "integer"
                    },
                    "auditLogId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "changed",
                    "createdOptionValues",
                    "updatedOptionValues",
                    "updatedTiersCount",
                    "updatedSurchargesCount",
                    "auditLogId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/product-options/{id}": {
      "patch": {
        "summary": "Update product option",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "isRequired": {
                    "type": "boolean"
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated product option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "productId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "optionId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "isRequired": {
                          "type": "boolean"
                        },
                        "sortOrder": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "option": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "TABLE",
                                "RADIO",
                                "CHECKBOX",
                                "SELECT",
                                "MATRIX"
                              ]
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "values": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "optionId": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "imageUrl": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "uri"
                                  },
                                  "description": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sortOrder": {
                                    "type": "integer"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                },
                                "required": [
                                  "id",
                                  "optionId",
                                  "name",
                                  "slug",
                                  "imageUrl",
                                  "description",
                                  "sortOrder",
                                  "createdAt",
                                  "updatedAt"
                                ]
                              }
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "description",
                            "type",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "productOptionId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "optionValueId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "externalCode": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "code": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "stock": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "subtract": {
                                "type": "boolean"
                              },
                              "sortOrder": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "priceDelta": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "optionValue": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "optionId": {
                                    "type": "string",
                                    "format": "cuid"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "imageUrl": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "uri"
                                  },
                                  "description": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sortOrder": {
                                    "type": "integer"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                },
                                "required": [
                                  "id",
                                  "optionId",
                                  "name",
                                  "slug",
                                  "imageUrl",
                                  "description",
                                  "sortOrder",
                                  "createdAt",
                                  "updatedAt"
                                ]
                              },
                              "tiers": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "productOptionValueId": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "qtyMin": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "price": {
                                      "type": "number"
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "updatedAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "productOptionValueId",
                                    "qtyMin",
                                    "price",
                                    "createdAt",
                                    "updatedAt"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "productOptionId",
                              "optionValueId",
                              "stock",
                              "subtract",
                              "sortOrder",
                              "priceDelta",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "productId",
                        "optionId",
                        "isRequired",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Detach product option",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Product option detached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/product-options/{id}/values": {
      "post": {
        "summary": "Attach option value to product option",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "optionValueId": {
                    "type": "string",
                    "format": "cuid"
                  },
                  "stock": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": 999999
                  },
                  "subtract": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": false
                  },
                  "sortOrder": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": 0
                  },
                  "priceDelta": {
                    "anyOf": [
                      {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pricePrefix": {
                    "type": "string",
                    "enum": [
                      "PLUS",
                      "MINUS",
                      "PERCENT"
                    ],
                    "default": "PLUS"
                  }
                },
                "required": [
                  "optionValueId"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Attached option value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "productOptionId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "optionValueId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "externalCode": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "stock": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "subtract": {
                          "type": "boolean"
                        },
                        "sortOrder": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "priceDelta": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "optionValue": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "optionId": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "imageUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "optionId",
                            "name",
                            "slug",
                            "imageUrl",
                            "description",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        },
                        "tiers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "productOptionValueId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "qtyMin": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "price": {
                                "type": "number"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "productOptionValueId",
                              "qtyMin",
                              "price",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "productOptionId",
                        "optionValueId",
                        "stock",
                        "subtract",
                        "sortOrder",
                        "priceDelta",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/product-option-values/{id}": {
      "patch": {
        "summary": "Update product option value",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stock": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "subtract": {
                    "type": "boolean"
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "priceDelta": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated product option value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "cuid"
                    },
                    "productOptionId": {
                      "type": "string",
                      "format": "cuid"
                    },
                    "optionValueId": {
                      "type": "string",
                      "format": "cuid"
                    },
                    "externalCode": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "code": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stock": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "subtract": {
                      "type": "boolean"
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "priceDelta": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "optionValue": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "optionId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "imageUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sortOrder": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "optionId",
                        "name",
                        "slug",
                        "imageUrl",
                        "description",
                        "sortOrder",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "tiers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "cuid"
                          },
                          "productOptionValueId": {
                            "type": "string",
                            "format": "cuid"
                          },
                          "qtyMin": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "price": {
                            "type": "number"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "productOptionValueId",
                          "qtyMin",
                          "price",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "productOptionId",
                    "optionValueId",
                    "stock",
                    "subtract",
                    "sortOrder",
                    "priceDelta",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Detach product option value",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Product option value detached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "null"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/product-option-values/{id}/tiers": {
      "post": {
        "summary": "Create price tiers",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tiers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "qtyMin": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "price": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "minimum": 0
                        }
                      },
                      "required": [
                        "qtyMin",
                        "price"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "tiers"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created price tiers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "cuid"
                      },
                      "productOptionValueId": {
                        "type": "string",
                        "format": "cuid"
                      },
                      "qtyMin": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "price": {
                        "type": "number"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "productOptionValueId",
                      "qtyMin",
                      "price",
                      "createdAt",
                      "updatedAt"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/price-tiers/{id}": {
      "patch": {
        "summary": "Update price tier",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "qtyMin": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "price": {
                    "type": "number",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated price tier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "productOptionValueId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "qtyMin": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "price": {
                          "type": "number"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "productOptionValueId",
                        "qtyMin",
                        "price",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete price tier",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Price tier deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/countries": {
      "get": {
        "summary": "List countries",
        "tags": [
          "Countries"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "query",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Countries list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "countries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "isSystem": {
                                "type": "boolean"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "code": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "code2": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "code3": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "isSystem",
                              "name",
                              "description",
                              "code",
                              "code2",
                              "code3",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "countries"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create country",
        "tags": [
          "Countries"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4096
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "code": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "code2": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "code3": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created country",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "isSystem": {
                              "type": "boolean"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "code2": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "code3": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "isSystem",
                            "name",
                            "description",
                            "code",
                            "code2",
                            "code3",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "country"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/countries/{id}": {
      "get": {
        "summary": "Get country",
        "tags": [
          "Countries"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Country details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "isSystem": {
                              "type": "boolean"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "code2": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "code3": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "isSystem",
                            "name",
                            "description",
                            "code",
                            "code2",
                            "code3",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "country"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update country",
        "tags": [
          "Countries"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4096
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "code": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "code2": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "code3": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated country",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "isSystem": {
                              "type": "boolean"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "code2": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "code3": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "isSystem",
                            "name",
                            "description",
                            "code",
                            "code2",
                            "code3",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "country"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete country",
        "tags": [
          "Countries"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Country deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/counterparties": {
      "get": {
        "summary": "List counterparties",
        "tags": [
          "Counterparties"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number (1-based)"
            },
            "required": false,
            "description": "Page number (1-based)",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Number of records per page"
            },
            "required": false,
            "description": "Number of records per page",
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_]+:(asc|desc)$"
            },
            "required": false,
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated relation names to include in the response"
            },
            "required": false,
            "description": "Comma-separated relation names to include in the response",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "q",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated counterparty list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "cuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "phone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "actualAddress": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "externalCode": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "companyType": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "tin": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "legalLastName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "legalFirstName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "legalMiddleName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "legalAddress": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "phone",
                          "email",
                          "actualAddress",
                          "description",
                          "code",
                          "externalCode",
                          "tin",
                          "legalLastName",
                          "legalFirstName",
                          "legalMiddleName",
                          "legalAddress",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create counterparty",
        "tags": [
          "Counterparties"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "phone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "email": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "actualAddress": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4096
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "code": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "externalCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "companyType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "LEGAL_ENTITY",
                          "INDIVIDUAL",
                          "SOLE_PROPRIETOR"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "tin": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "legalLastName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "legalFirstName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "legalMiddleName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "legalAddress": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created counterparty",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "phone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "actualAddress": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "externalCode": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "companyType": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "tin": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "legalLastName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "legalFirstName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "legalMiddleName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "legalAddress": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "phone",
                        "email",
                        "actualAddress",
                        "description",
                        "code",
                        "externalCode",
                        "tin",
                        "legalLastName",
                        "legalFirstName",
                        "legalMiddleName",
                        "legalAddress",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/counterparties/{id}": {
      "get": {
        "summary": "Get counterparty",
        "tags": [
          "Counterparties"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated list of fields to project in the response"
            },
            "required": false,
            "description": "Comma-separated list of fields to project in the response",
            "name": "fields",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Counterparty details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "phone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "actualAddress": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "externalCode": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "companyType": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "tin": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "legalLastName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "legalFirstName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "legalMiddleName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "legalAddress": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "phone",
                        "email",
                        "actualAddress",
                        "description",
                        "code",
                        "externalCode",
                        "tin",
                        "legalLastName",
                        "legalFirstName",
                        "legalMiddleName",
                        "legalAddress",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update counterparty",
        "tags": [
          "Counterparties"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "phone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "email": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "actualAddress": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4096
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "code": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "externalCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "companyType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "LEGAL_ENTITY",
                          "INDIVIDUAL",
                          "SOLE_PROPRIETOR"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "tin": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "legalLastName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "legalFirstName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "legalMiddleName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "legalAddress": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated counterparty",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "phone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "actualAddress": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "externalCode": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "companyType": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "tin": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "legalLastName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "legalFirstName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "legalMiddleName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "legalAddress": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "phone",
                        "email",
                        "actualAddress",
                        "description",
                        "code",
                        "externalCode",
                        "tin",
                        "legalLastName",
                        "legalFirstName",
                        "legalMiddleName",
                        "legalAddress",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete counterparty",
        "tags": [
          "Counterparties"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Counterparty deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/currencies": {
      "get": {
        "summary": "List currencies",
        "tags": [
          "Currencies"
        ],
        "responses": {
          "200": {
            "description": "Currencies list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "currencies": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "shortName": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "numericCode": {
                                "type": "string"
                              },
                              "alphaCode": {
                                "type": "string"
                              },
                              "rate": {
                                "type": "string"
                              },
                              "isAccounting": {
                                "type": "boolean"
                              },
                              "isEnabled": {
                                "type": "boolean"
                              },
                              "sortOrder": {
                                "type": "integer"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "shortName",
                              "name",
                              "numericCode",
                              "alphaCode",
                              "rate",
                              "isAccounting",
                              "isEnabled",
                              "sortOrder",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "currencies"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create currency",
        "tags": [
          "Currencies"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shortName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 16
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "numericCode": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 6,
                    "pattern": "^\\d+$"
                  },
                  "alphaCode": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 6,
                    "pattern": "^[A-Za-z]+$"
                  },
                  "rate": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "isAccounting": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": false
                  },
                  "isEnabled": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": true
                  },
                  "sortOrder": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": 0
                  }
                },
                "required": [
                  "name",
                  "numericCode",
                  "alphaCode",
                  "rate"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created currency",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "shortName": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "numericCode": {
                              "type": "string"
                            },
                            "alphaCode": {
                              "type": "string"
                            },
                            "rate": {
                              "type": "string"
                            },
                            "isAccounting": {
                              "type": "boolean"
                            },
                            "isEnabled": {
                              "type": "boolean"
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "shortName",
                            "name",
                            "numericCode",
                            "alphaCode",
                            "rate",
                            "isAccounting",
                            "isEnabled",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "currency"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/currencies/{id}": {
      "get": {
        "summary": "Get currency",
        "tags": [
          "Currencies"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Currency details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "shortName": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "numericCode": {
                              "type": "string"
                            },
                            "alphaCode": {
                              "type": "string"
                            },
                            "rate": {
                              "type": "string"
                            },
                            "isAccounting": {
                              "type": "boolean"
                            },
                            "isEnabled": {
                              "type": "boolean"
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "shortName",
                            "name",
                            "numericCode",
                            "alphaCode",
                            "rate",
                            "isAccounting",
                            "isEnabled",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "currency"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update currency",
        "tags": [
          "Currencies"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shortName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 16
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "numericCode": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 6,
                    "pattern": "^\\d+$"
                  },
                  "alphaCode": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 6,
                    "pattern": "^[A-Za-z]+$"
                  },
                  "rate": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "isAccounting": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "isEnabled": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "sortOrder": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated currency",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "shortName": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "numericCode": {
                              "type": "string"
                            },
                            "alphaCode": {
                              "type": "string"
                            },
                            "rate": {
                              "type": "string"
                            },
                            "isAccounting": {
                              "type": "boolean"
                            },
                            "isEnabled": {
                              "type": "boolean"
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "shortName",
                            "name",
                            "numericCode",
                            "alphaCode",
                            "rate",
                            "isAccounting",
                            "isEnabled",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "currency"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Disable currency",
        "tags": [
          "Currencies"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Currency disabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "cuid"
                            },
                            "shortName": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "numericCode": {
                              "type": "string"
                            },
                            "alphaCode": {
                              "type": "string"
                            },
                            "rate": {
                              "type": "string"
                            },
                            "isAccounting": {
                              "type": "boolean"
                            },
                            "isEnabled": {
                              "type": "boolean"
                            },
                            "sortOrder": {
                              "type": "integer"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "shortName",
                            "name",
                            "numericCode",
                            "alphaCode",
                            "rate",
                            "isAccounting",
                            "isEnabled",
                            "sortOrder",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "currency"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders": {
      "get": {
        "summary": "List orders",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "NEW",
                "CONFIRMED",
                "CANCELLED"
              ]
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": false,
            "name": "counterpartyId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_]+:(asc|desc)$"
            },
            "required": false,
            "name": "sort",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated order list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "cuid"
                          },
                          "companyId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "status": {
                            "type": "string"
                          },
                          "customerName": {
                            "type": "string"
                          },
                          "customerPhone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "customerEmail": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "shippingAddress": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "comment": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "currencyCode": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "subtotal": {
                            "type": "string"
                          },
                          "total": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "cuid"
                                },
                                "orderId": {
                                  "type": "string",
                                  "format": "cuid"
                                },
                                "productId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "cuid"
                                },
                                "productName": {
                                  "type": "string"
                                },
                                "productCode": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "quantity": {
                                  "type": "integer"
                                },
                                "unitPrice": {
                                  "type": "string"
                                },
                                "lineTotal": {
                                  "type": "string"
                                },
                                "sortOrder": {
                                  "type": "integer"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "options": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "format": "cuid"
                                      },
                                      "orderItemId": {
                                        "type": "string",
                                        "format": "cuid"
                                      },
                                      "optionName": {
                                        "type": "string"
                                      },
                                      "optionValueName": {
                                        "type": "string"
                                      },
                                      "pricePrefix": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "priceValue": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "createdAt": {
                                        "type": "string",
                                        "format": "date-time"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "orderItemId",
                                      "optionName",
                                      "optionValueName",
                                      "pricePrefix",
                                      "createdAt"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "id",
                                "orderId",
                                "productId",
                                "productName",
                                "productCode",
                                "quantity",
                                "unitPrice",
                                "lineTotal",
                                "sortOrder",
                                "createdAt"
                              ]
                            }
                          },
                          "itemsCount": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "companyId",
                          "status",
                          "customerName",
                          "customerPhone",
                          "customerEmail",
                          "shippingAddress",
                          "comment",
                          "currencyCode",
                          "subtotal",
                          "total",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create order",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "phone": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "string",
                            "enum": [
                              ""
                            ]
                          }
                        ]
                      },
                      "email": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "string",
                            "enum": [
                              ""
                            ]
                          }
                        ]
                      },
                      "address": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "string",
                            "enum": [
                              ""
                            ]
                          }
                        ]
                      },
                      "comment": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "string",
                            "enum": [
                              ""
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  },
                  "currency": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "productId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "string",
                              "enum": [
                                ""
                              ]
                            }
                          ]
                        },
                        "productName": {
                          "type": "string",
                          "minLength": 1
                        },
                        "productCode": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "string",
                              "enum": [
                                ""
                              ]
                            }
                          ]
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "unitPrice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "minimum": 0
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "optionName": {
                                "type": "string",
                                "minLength": 1
                              },
                              "optionValueName": {
                                "type": "string",
                                "minLength": 1
                              },
                              "pricePrefix": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      ""
                                    ]
                                  }
                                ]
                              },
                              "priceValue": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "optionName",
                              "optionValueName"
                            ]
                          },
                          "default": []
                        }
                      },
                      "required": [
                        "productName",
                        "quantity",
                        "unitPrice"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "customer",
                  "items"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orderId": {
                          "type": "string",
                          "format": "cuid"
                        }
                      },
                      "required": [
                        "orderId"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{id}": {
      "get": {
        "summary": "Get order",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Order details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "companyId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "status": {
                          "type": "string"
                        },
                        "customerName": {
                          "type": "string"
                        },
                        "customerPhone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "customerEmail": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "shippingAddress": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "comment": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "currencyCode": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "subtotal": {
                          "type": "string"
                        },
                        "total": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "orderId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "productId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "cuid"
                              },
                              "productName": {
                                "type": "string"
                              },
                              "productCode": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "quantity": {
                                "type": "integer"
                              },
                              "unitPrice": {
                                "type": "string"
                              },
                              "lineTotal": {
                                "type": "string"
                              },
                              "sortOrder": {
                                "type": "integer"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "options": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "orderItemId": {
                                      "type": "string",
                                      "format": "cuid"
                                    },
                                    "optionName": {
                                      "type": "string"
                                    },
                                    "optionValueName": {
                                      "type": "string"
                                    },
                                    "pricePrefix": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "priceValue": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "orderItemId",
                                    "optionName",
                                    "optionValueName",
                                    "pricePrefix",
                                    "createdAt"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "orderId",
                              "productId",
                              "productName",
                              "productCode",
                              "quantity",
                              "unitPrice",
                              "lineTotal",
                              "sortOrder",
                              "createdAt"
                            ]
                          }
                        },
                        "itemsCount": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "companyId",
                        "status",
                        "customerName",
                        "customerPhone",
                        "customerEmail",
                        "shippingAddress",
                        "comment",
                        "currencyCode",
                        "subtotal",
                        "total",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update order",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "phone": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "string",
                            "enum": [
                              ""
                            ]
                          }
                        ]
                      },
                      "email": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "string",
                            "enum": [
                              ""
                            ]
                          }
                        ]
                      },
                      "address": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "string",
                            "enum": [
                              ""
                            ]
                          }
                        ]
                      },
                      "comment": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "string",
                            "enum": [
                              ""
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  },
                  "currency": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ]
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "productId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "string",
                              "enum": [
                                ""
                              ]
                            }
                          ]
                        },
                        "productName": {
                          "type": "string",
                          "minLength": 1
                        },
                        "productCode": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "string",
                              "enum": [
                                ""
                              ]
                            }
                          ]
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "unitPrice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "minimum": 0
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "optionName": {
                                "type": "string",
                                "minLength": 1
                              },
                              "optionValueName": {
                                "type": "string",
                                "minLength": 1
                              },
                              "pricePrefix": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      ""
                                    ]
                                  }
                                ]
                              },
                              "priceValue": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "optionName",
                              "optionValueName"
                            ]
                          },
                          "default": []
                        }
                      },
                      "required": [
                        "productName",
                        "quantity",
                        "unitPrice"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "customer",
                  "items"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orderId": {
                          "type": "string",
                          "format": "cuid"
                        }
                      },
                      "required": [
                        "orderId"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete order",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orderId": {
                          "type": "string",
                          "format": "cuid"
                        }
                      },
                      "required": [
                        "orderId"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/system/companies": {
      "get": {
        "summary": "List companies",
        "tags": [
          "System"
        ],
        "responses": {
          "200": {
            "description": "Companies list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "companies": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "usersCount": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "slug",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "companies"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create company",
        "tags": [
          "System"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 2
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created company",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "company": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "company"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/system/companies/{id}": {
      "get": {
        "summary": "Get company",
        "tags": [
          "System"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Company details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "company": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "company"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update company",
        "tags": [
          "System"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 2
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated company",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "company": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "company"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/system/users": {
      "get": {
        "summary": "List system users",
        "tags": [
          "System"
        ],
        "responses": {
          "200": {
            "description": "Users list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "users": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "email": {
                                "type": "string",
                                "format": "email"
                              },
                              "role": {
                                "type": "string"
                              },
                              "companyId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "company": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "slug": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "slug"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "email",
                              "role",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "users"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/system/users/{id}": {
      "get": {
        "summary": "Get system user",
        "tags": [
          "System"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "User details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "email": {
                              "type": "string",
                              "format": "email"
                            },
                            "role": {
                              "type": "string"
                            },
                            "companyId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "company": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string"
                                },
                                "slug": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "slug"
                              ]
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "email",
                            "role",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "user"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update system user",
        "tags": [
          "System"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "MANAGER",
                      "ADMIN",
                      "SUPERADMIN"
                    ]
                  },
                  "companyId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "email": {
                              "type": "string",
                              "format": "email"
                            },
                            "role": {
                              "type": "string"
                            },
                            "companyId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "company": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string"
                                },
                                "slug": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "slug"
                              ]
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "email",
                            "role",
                            "createdAt",
                            "updatedAt"
                          ]
                        }
                      },
                      "required": [
                        "user"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pricing/preview": {
      "post": {
        "summary": "Preview product pricing",
        "tags": [
          "Pricing"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "productId": {
                    "type": "string",
                    "format": "cuid"
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "selections": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "optionId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "valueId": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "checked": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "optionId"
                      ]
                    },
                    "default": []
                  }
                },
                "required": [
                  "productId",
                  "quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pricing preview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "unitPrice": {
                          "type": "number"
                        },
                        "lineTotal": {
                          "type": "number"
                        },
                        "breakdown": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "optionId": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "label": {
                                "type": "string"
                              },
                              "delta": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "optionId",
                              "label",
                              "delta"
                            ]
                          }
                        }
                      },
                      "required": [
                        "unitPrice",
                        "lineTotal",
                        "breakdown"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/upload": {
      "post": {
        "summary": "Upload media",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "products",
                "categories",
                "other",
                "misc"
              ]
            },
            "required": false,
            "name": "group",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "description": "Binary file to upload"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Uploaded file information",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "relativePath": {
                          "type": "string"
                        },
                        "originalName": {
                          "type": "string"
                        },
                        "storedName": {
                          "type": "string"
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "mime": {
                          "type": "string"
                        },
                        "group": {
                          "type": "string",
                          "enum": [
                            "products",
                            "categories",
                            "other",
                            "misc"
                          ]
                        }
                      },
                      "required": [
                        "url",
                        "relativePath",
                        "originalName",
                        "storedName",
                        "size",
                        "mime",
                        "group"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files": {
      "get": {
        "summary": "List file assets",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "fields",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "PRODUCTS",
                "CATEGORIES",
                "OTHER"
              ]
            },
            "required": false,
            "name": "group",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated file assets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "cuid"
                              },
                              "group": {
                                "type": "string",
                                "enum": [
                                  "PRODUCTS",
                                  "CATEGORIES",
                                  "OTHER"
                                ]
                              },
                              "entityType": {
                                "type": "string",
                                "enum": [
                                  "PRODUCT",
                                  "CATEGORY",
                                  "STOREFRONT_PAGE"
                                ]
                              },
                              "entityId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "originalName": {
                                "type": "string"
                              },
                              "storedName": {
                                "type": "string"
                              },
                              "relativePath": {
                                "type": "string"
                              },
                              "mimeType": {
                                "type": "string"
                              },
                              "sizeBytes": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uri"
                              },
                              "locationHref": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "locationLabel": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "group",
                              "entityType",
                              "entityId",
                              "originalName",
                              "storedName",
                              "relativePath",
                              "mimeType",
                              "sizeBytes",
                              "createdAt",
                              "updatedAt",
                              "url",
                              "locationHref",
                              "locationLabel"
                            ]
                          }
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "items",
                        "total",
                        "page",
                        "pageSize",
                        "pageCount"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/{id}": {
      "get": {
        "summary": "Get file asset",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "File asset details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "cuid"
                        },
                        "group": {
                          "type": "string",
                          "enum": [
                            "PRODUCTS",
                            "CATEGORIES",
                            "OTHER"
                          ]
                        },
                        "entityType": {
                          "type": "string",
                          "enum": [
                            "PRODUCT",
                            "CATEGORY",
                            "STOREFRONT_PAGE"
                          ]
                        },
                        "entityId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "originalName": {
                          "type": "string"
                        },
                        "storedName": {
                          "type": "string"
                        },
                        "relativePath": {
                          "type": "string"
                        },
                        "mimeType": {
                          "type": "string"
                        },
                        "sizeBytes": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri"
                        },
                        "locationHref": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "locationLabel": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "group",
                        "entityType",
                        "entityId",
                        "originalName",
                        "storedName",
                        "relativePath",
                        "mimeType",
                        "sizeBytes",
                        "createdAt",
                        "updatedAt",
                        "url",
                        "locationHref",
                        "locationLabel"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete file asset",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "cuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted file asset",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deletedId": {
                          "type": "string",
                          "format": "cuid"
                        }
                      },
                      "required": [
                        "deletedId"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/account/change-name": {
      "post": {
        "summary": "Change current user name",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated account name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "ok",
                        "name"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/account/change-email": {
      "post": {
        "summary": "Change current user email",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "currentPassword": {
                    "type": "string",
                    "minLength": 1
                  },
                  "newEmail": {
                    "type": "string",
                    "format": "email"
                  }
                },
                "required": [
                  "currentPassword",
                  "newEmail"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated account email",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "email": {
                          "type": "string",
                          "format": "email"
                        }
                      },
                      "required": [
                        "ok",
                        "email"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/account/change-password": {
      "post": {
        "summary": "Change current user password",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "currentPassword": {
                    "type": "string",
                    "minLength": 1
                  },
                  "newPassword": {
                    "type": "string",
                    "minLength": 8
                  }
                },
                "required": [
                  "currentPassword",
                  "newPassword"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated account password",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "ok"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/account/change-company-name": {
      "post": {
        "summary": "Change company name",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated company name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ok",
                        "name"
                      ]
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "pageSize": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pageCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "null"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "SERVER_ERROR",
                            "PRECONDITION_FAILED"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "fields": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/openapi.json": {
      "get": {
        "summary": "Download OpenAPI specification",
        "tags": [
          "Documentation"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI document",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}