[
  {
    "endpoint": "/api/tickets",
    "method": "GET",
    "description": "Retrieve all tickets.",
    "responses": {
      "200": { "$ref": "../examples/tickets/list.200.json" },
      "403": { "$ref": "../examples/errors/403.json" }
    }
  },
  {
    "endpoint": "/api/tickets/:id",
    "method": "GET",
    "description": "Retrieve a ticket by ID.",
    "request": {
      "params": { "id": "integer" }
    },
    "responses": {
      "200": { "$ref": "../examples/tickets/get.200.json" },
      "403": { "$ref": "../examples/errors/403.json" },
      "404": { "$ref": "../examples/errors/404.json" }
    }
  },
  {
    "endpoint": "/api/tickets",
    "method": "POST",
    "description": "Create a new ticket.",
    "request": {
      "body": {
        "client_id": "integer (required, must exist in users)",
        "assigned_admin_id": "integer (optional, must exist in users)",
        "subject": "string (required, non-empty)",
        "status": "string (optional, enum: [open, closed, in_progress])"
      }
    },
    "responses": {
      "201": { "$ref": "../examples/tickets/post.201.json" },
      "400": { "$ref": "../examples/errors/400.json" },
      "403": { "$ref": "../examples/errors/403.json" }
    }
  },
  {
    "endpoint": "/api/tickets/:id",
    "method": "PUT",
    "description": "Update an existing ticket.",
    "request": {
      "params": { "id": "integer" },
      "body": {
        "subject": "string (optional, non-empty)",
        "assigned_admin_id": "integer (optional)",
        "status": "string (optional, enum: [open, closed, in_progress])"
      }
    },
    "responses": {
      "200": { "$ref": "../examples/tickets/put.200.json" },
      "400": { "$ref": "../examples/errors/400.json" },
      "403": { "$ref": "../examples/errors/403.json" },
      "404": { "$ref": "../examples/errors/404.json" }
    }
  },
  {
    "endpoint": "/api/tickets/:id",
    "method": "DELETE",
    "description": "Delete a ticket by ID.",
    "request": {
      "params": { "id": "integer" }
    },
    "responses": {
      "200": { "$ref": "../examples/tickets/delete.200.json" },
      "403": { "$ref": "../examples/errors/403.json" },
      "404": { "$ref": "../examples/errors/404.json" }
    }
  }
]
