{
  "openapi": "3.1.0",
  "info": {
    "title": "SkillExchange Marketplace API",
    "version": "1.0.0",
    "description": "The SkillExchange API enables developers and AI agents to discover, execute, and manage skills on the marketplace. Supports REST, MCP (Model Context Protocol), and A2A (Agent-to-Agent) protocols.",
    "contact": {
      "name": "SkillExchange Support",
      "email": "support@skillexchange.market",
      "url": "https://skillexchange.market/docs"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://skillexchange.market/terms"
    }
  },
  "servers": [
    {
      "url": "https://skillexchange.market/api",
      "description": "Production"
    },
    {
      "url": "http://localhost:3000/api",
      "description": "Local Development"
    }
  ],
  "security": [
    {},
    { "BearerAuth": [] }
  ],
  "paths": {
    "/skills": {
      "get": {
        "operationId": "listSkills",
        "summary": "List all skills",
        "description": "Retrieve a paginated list of published skills with filtering, sorting, and search capabilities.",
        "tags": ["Skills"],
        "parameters": [
          { "$ref": "#/components/parameters/PageParam" },
          { "$ref": "#/components/parameters/LimitParam" },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": { "type": "string" },
            "description": "Filter by category (e.g. marketing, automation, analytics)"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": { "type": "string" },
            "description": "Full-text search across name and description"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["rating_avg", "price", "created_at", "rating_count"]
            },
            "description": "Sort field (prefix with - for descending)"
          },
          {
            "name": "pricing_model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["free", "per_use", "subscription", "freemium"]
            }
          },
          {
            "name": "protocol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["mcp", "a2a", "rest"]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of skills",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/SkillListResponse" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      },
      "post": {
        "operationId": "createSkill",
        "summary": "Create a skill",
        "description": "Create and publish a new skill on the marketplace. Requires authentication.",
        "tags": ["Skills"],
        "security": [{ "BearerAuth": [] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/SkillCreateInput" }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Skill created successfully",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Skill" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "409": { "$ref": "#/components/responses/Conflict" }
        }
      }
    },
    "/skills/{id}": {
      "get": {
        "operationId": "getSkill",
        "summary": "Get skill details",
        "description": "Retrieve full details for a single skill by ID.",
        "tags": ["Skills"],
        "parameters": [
          { "$ref": "#/components/parameters/SkillIdParam" }
        ],
        "responses": {
          "200": {
            "description": "Skill details",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Skill" }
              }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      },
      "patch": {
        "operationId": "updateSkill",
        "summary": "Update a skill",
        "description": "Update an existing skill. Requires owner or admin role.",
        "tags": ["Skills"],
        "security": [{ "BearerAuth": [] }],
        "parameters": [
          { "$ref": "#/components/parameters/SkillIdParam" }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/SkillUpdateInput" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Skill updated successfully",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Skill" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      },
      "delete": {
        "operationId": "deleteSkill",
        "summary": "Delete a skill",
        "description": "Permanently delete a skill. Requires owner or admin role.",
        "tags": ["Skills"],
        "security": [{ "BearerAuth": [] }],
        "parameters": [
          { "$ref": "#/components/parameters/SkillIdParam" }
        ],
        "responses": {
          "200": {
            "description": "Skill deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean", "example": true }
                  }
                }
              }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/skills/{id}/manifest": {
      "get": {
        "operationId": "getSkillManifest",
        "summary": "Get MCP manifest",
        "description": "Retrieve the MCP-compliant manifest for a skill. Used by AI agents to discover capabilities.",
        "tags": ["Skills"],
        "parameters": [
          { "$ref": "#/components/parameters/SkillIdParam" }
        ],
        "responses": {
          "200": {
            "description": "MCP manifest",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/MCPManifest" }
              }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/skills/{id}/execute": {
      "post": {
        "operationId": "executeSkill",
        "summary": "Execute a skill",
        "description": "Execute a skill by ID. Creates a transaction and charges the caller if the skill is paid.",
        "tags": ["Skills"],
        "security": [{ "BearerAuth": [] }],
        "parameters": [
          { "$ref": "#/components/parameters/SkillIdParam" }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/SkillExecuteInput" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Skill executed successfully",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/SkillExecuteResponse" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "402": { "$ref": "#/components/responses/PaymentRequired" },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/agents": {
      "get": {
        "operationId": "listAgents",
        "summary": "List agents",
        "description": "Retrieve a paginated list of registered agents on the marketplace.",
        "tags": ["Agents"],
        "parameters": [
          { "$ref": "#/components/parameters/PageParam" },
          { "$ref": "#/components/parameters/LimitParam" },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of agents",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/AgentListResponse" }
              }
            }
          }
        }
      }
    },
    "/a2a/agents": {
      "get": {
        "operationId": "discoverA2AAgents",
        "summary": "A2A Agent Discovery",
        "description": "Discover agents supporting Google's Agent-to-Agent protocol.",
        "tags": ["A2A"],
        "responses": {
          "200": {
            "description": "List of A2A-capable agents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agents": {
                      "type": "array",
                      "items": { "$ref": "#/components/schemas/A2ACard" }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/a2a/agents/{id}": {
      "get": {
        "operationId": "getA2AAgentCard",
        "summary": "Get A2A Agent Card",
        "description": "Retrieve the A2A Agent Card for a specific agent.",
        "tags": ["A2A"],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": { "type": "string" },
            "description": "Agent ID"
          }
        ],
        "responses": {
          "200": {
            "description": "A2A Agent Card",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/A2ACard" }
              }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/mcp/tools/list": {
      "post": {
        "operationId": "mcpListTools",
        "summary": "List MCP tools",
        "description": "List all available MCP tools across the platform with their input schemas.",
        "tags": ["MCP"],
        "security": [{ "BearerAuth": [] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of MCP tools",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tools": {
                      "type": "array",
                      "items": { "$ref": "#/components/schemas/MCPTool" }
                    }
                  }
                }
              }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" }
        }
      }
    },
    "/mcp/tools/call": {
      "post": {
        "operationId": "mcpCallTool",
        "summary": "Call MCP tool",
        "description": "Execute an MCP tool by name with the provided arguments.",
        "tags": ["MCP"],
        "security": [{ "BearerAuth": [] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/MCPCallToolInput" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool execution result",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/MCPCallToolResponse" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "402": { "$ref": "#/components/responses/PaymentRequired" }
        }
      }
    },
    "/mcp/manifest": {
      "get": {
        "operationId": "getMCPManifest",
        "summary": "Platform MCP manifest",
        "description": "Get the platform-level MCP manifest with metadata and tool count.",
        "tags": ["MCP"],
        "responses": {
          "200": {
            "description": "Platform MCP manifest",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": { "type": "string", "example": "skillexchange" },
                    "version": { "type": "string", "example": "1.0.0" },
                    "description": { "type": "string" },
                    "tools_count": { "type": "integer" },
                    "protocol_version": { "type": "string", "example": "2025-03-26" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/stripe/create-connect-account": {
      "post": {
        "operationId": "createConnectAccount",
        "summary": "Creator onboarding",
        "description": "Initiate Stripe Connect onboarding for a creator. Returns a redirect URL.",
        "tags": ["Stripe"],
        "security": [{ "BearerAuth": [] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["return_url"],
                "properties": {
                  "return_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "URL to redirect after onboarding completes"
                  },
                  "refresh_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "URL to redirect if onboarding needs to be restarted"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Connect account created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account_id": { "type": "string", "example": "acct_abc123" },
                    "onboarding_url": { "type": "string", "format": "uri" }
                  }
                }
              }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "500": { "$ref": "#/components/responses/InternalServerError" }
        }
      }
    },
    "/stripe/create-payment": {
      "post": {
        "operationId": "createPayment",
        "summary": "Create payment",
        "description": "Create a Stripe payment intent for skill execution.",
        "tags": ["Stripe"],
        "security": [{ "BearerAuth": [] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["skill_id", "amount", "currency"],
                "properties": {
                  "skill_id": { "type": "string" },
                  "amount": { "type": "integer", "description": "Amount in cents" },
                  "currency": { "type": "string", "example": "usd" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payment intent created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "client_secret": { "type": "string" },
                    "payment_intent_id": { "type": "string" },
                    "amount": { "type": "integer" },
                    "currency": { "type": "string" }
                  }
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/stripe/webhook": {
      "post": {
        "operationId": "stripeWebhook",
        "summary": "Stripe webhook",
        "description": "Webhook endpoint for Stripe events (payment succeeded, account verified, etc.). Configured in Stripe Dashboard.",
        "tags": ["Stripe"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": { "type": "string", "example": "payment_intent.succeeded" },
                  "data": {
                    "type": "object",
                    "properties": {
                      "object": {
                        "type": "object",
                        "properties": {
                          "id": { "type": "string" },
                          "amount": { "type": "integer" },
                          "currency": { "type": "string" },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": { "type": "string" }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "received": { "type": "boolean", "example": true }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key or JWT",
        "description": "Pass your API key as a Bearer token in the Authorization header."
      }
    },
    "parameters": {
      "PageParam": {
        "name": "page",
        "in": "query",
        "required": false,
        "schema": { "type": "integer", "minimum": 1, "default": 1 },
        "description": "Page number for pagination"
      },
      "LimitParam": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 },
        "description": "Number of items per page"
      },
      "SkillIdParam": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": { "type": "string" },
        "description": "Skill ID"
      }
    },
    "schemas": {
      "Skill": {
        "type": "object",
        "required": ["id", "name", "description", "category", "pricing_model", "created_at"],
        "properties": {
          "id": { "type": "string", "example": "skill_01" },
          "name": { "type": "string", "example": "SEO Analyzer" },
          "description": { "type": "string" },
          "category": { "type": "string", "example": "marketing" },
          "pricing_model": {
            "type": "string",
            "enum": ["free", "per_use", "subscription", "freemium"],
            "example": "per_use"
          },
          "price": { "type": "number", "nullable": true, "example": 0.05 },
          "currency": { "type": "string", "example": "usd" },
          "author_id": { "type": "string" },
          "author_name": { "type": "string" },
          "rating_avg": { "type": "number", "format": "float", "example": 4.8 },
          "rating_count": { "type": "integer", "example": 127 },
          "protocols": {
            "type": "array",
            "items": { "type": "string", "enum": ["mcp", "a2a", "rest"] }
          },
          "source_url": { "type": "string", "format": "uri" },
          "versions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "semver": { "type": "string" },
                "released_at": { "type": "string", "format": "date-time" }
              }
            }
          },
          "created_at": { "type": "string", "format": "date-time" },
          "updated_at": { "type": "string", "format": "date-time" }
        }
      },
      "SkillCreateInput": {
        "type": "object",
        "required": ["name", "description", "category", "pricing_model"],
        "properties": {
          "name": { "type": "string" },
          "description": { "type": "string" },
          "category": { "type": "string" },
          "pricing_model": {
            "type": "string",
            "enum": ["free", "per_use", "subscription", "freemium"]
          },
          "price": { "type": "number", "nullable": true },
          "currency": { "type": "string", "default": "usd" },
          "protocols": {
            "type": "array",
            "items": { "type": "string" }
          },
          "manifest": { "type": "object" },
          "source_url": { "type": "string", "format": "uri" }
        }
      },
      "SkillUpdateInput": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "description": { "type": "string" },
          "category": { "type": "string" },
          "pricing_model": {
            "type": "string",
            "enum": ["free", "per_use", "subscription", "freemium"]
          },
          "price": { "type": "number", "nullable": true },
          "protocols": {
            "type": "array",
            "items": { "type": "string" }
          },
          "manifest": { "type": "object" },
          "source_url": { "type": "string", "format": "uri" }
        }
      },
      "SkillListResponse": {
        "type": "object",
        "properties": {
          "skills": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/Skill" }
          },
          "total": { "type": "integer" },
          "page": { "type": "integer" },
          "limit": { "type": "integer" }
        }
      },
      "SkillExecuteInput": {
        "type": "object",
        "required": ["tool"],
        "properties": {
          "tool": { "type": "string", "description": "Name of the tool to execute" },
          "args": {
            "type": "object",
            "additionalProperties": true,
            "description": "Arguments for the tool"
          }
        }
      },
      "SkillExecuteResponse": {
        "type": "object",
        "properties": {
          "transaction_id": { "type": "string" },
          "result": { "type": "object", "additionalProperties": true },
          "charged": { "type": "number", "nullable": true },
          "currency": { "type": "string" }
        }
      },
      "AgentListResponse": {
        "type": "object",
        "properties": {
          "agents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "string" },
                "name": { "type": "string" },
                "description": { "type": "string" },
                "skills_count": { "type": "integer" },
                "rating_avg": { "type": "number" }
              }
            }
          },
          "total": { "type": "integer" },
          "page": { "type": "integer" },
          "limit": { "type": "integer" }
        }
      },
      "A2ACard": {
        "type": "object",
        "properties": {
          "name": { "type": "string", "example": "SEO Bot" },
          "description": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": { "type": "string" },
                "description": { "type": "string" }
              }
            }
          },
          "authentication": {
            "type": "object",
            "properties": {
              "schemes": {
                "type": "array",
                "items": { "type": "string" }
              }
            }
          }
        }
      },
      "MCPManifest": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "version": { "type": "string" },
          "description": { "type": "string" },
          "tools": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/MCPTool" }
          }
        }
      },
      "MCPTool": {
        "type": "object",
        "required": ["name", "description", "inputSchema"],
        "properties": {
          "name": { "type": "string" },
          "description": { "type": "string" },
          "inputSchema": {
            "type": "object",
            "description": "JSON Schema for tool inputs",
            "additionalProperties": true
          }
        }
      },
      "MCPCallToolInput": {
        "type": "object",
        "required": ["name", "arguments"],
        "properties": {
          "name": { "type": "string", "description": "Tool name to call" },
          "arguments": {
            "type": "object",
            "additionalProperties": true,
            "description": "Tool arguments matching the tool's inputSchema"
          }
        }
      },
      "MCPCallToolResponse": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": { "type": "string", "example": "text" },
                "text": { "type": "string" }
              }
            }
          },
          "isError": { "type": "boolean" }
        }
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "skill_id": { "type": "string" },
          "buyer_id": { "type": "string" },
          "seller_id": { "type": "string" },
          "amount": { "type": "number" },
          "currency": { "type": "string" },
          "status": {
            "type": "string",
            "enum": ["pending", "completed", "failed", "refunded"]
          },
          "tool": { "type": "string" },
          "result": { "type": "object" },
          "created_at": { "type": "string", "format": "date-time" }
        }
      },
      "Review": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "skill_id": { "type": "string" },
          "user_id": { "type": "string" },
          "rating": { "type": "integer", "minimum": 1, "maximum": 5 },
          "comment": { "type": "string" },
          "created_at": { "type": "string", "format": "date-time" }
        }
      },
      "Error": {
        "type": "object",
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "required": ["code", "message"],
            "properties": {
              "code": { "type": "string" },
              "message": { "type": "string" },
              "details": { "type": "object", "additionalProperties": true }
            }
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Validation error or malformed request",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": { "error": { "code": "VALIDATION_ERROR", "message": "Missing required field: name" } }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing or invalid authentication",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": { "error": { "code": "UNAUTHORIZED", "message": "Invalid or missing API key" } }
          }
        }
      },
      "Forbidden": {
        "description": "Insufficient permissions",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": { "error": { "code": "FORBIDDEN", "message": "You do not own this resource" } }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": { "error": { "code": "NOT_FOUND", "message": "Skill not found" } }
          }
        }
      },
      "Conflict": {
        "description": "Resource already exists",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": { "error": { "code": "CONFLICT", "message": "Skill name already exists" } }
          }
        }
      },
      "PaymentRequired": {
        "description": "Payment required or insufficient balance",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": { "error": { "code": "PAYMENT_REQUIRED", "message": "Insufficient balance to execute this skill" } }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": { "error": { "code": "RATE_LIMITED", "message": "Too many requests. Try again later." } }
          }
        },
        "headers": {
          "X-RateLimit-Limit": { "schema": { "type": "integer" }, "description": "Rate limit ceiling" },
          "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "description": "Remaining requests" },
          "X-RateLimit-Reset": { "schema": { "type": "integer" }, "description": "Reset timestamp (Unix)" }
        }
      },
      "InternalServerError": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": { "error": { "code": "INTERNAL_ERROR", "message": "An unexpected error occurred" } }
          }
        }
      }
    }
  }
}
