{
  "openapi": "3.1.0",
  "info": {
    "title": "Draft Fantasy Public API",
    "version": "1.0.0",
    "description": "Public, read-only product discovery for Draft Fantasy. This API does not expose private account or league data.",
    "contact": {
      "name": "Draft Fantasy support",
      "email": "support@draftfantasy.com",
      "url": "https://www.draftfantasy.com/support"
    }
  },
  "servers": [
    {
      "url": "https://www.draftfantasy.com",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Draft Fantasy developer resources",
    "url": "https://www.draftfantasy.com/developers"
  },
  "paths": {
    "/api/v1/product": {
      "get": {
        "operationId": "getDraftFantasyProduct",
        "summary": "Get Draft Fantasy product information",
        "description": "Returns stable product capabilities and links suitable for discovery by agents and software integrations. No authentication is required.",
        "responses": {
          "200": {
            "description": "Draft Fantasy product information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "404": {
            "description": "The requested API route does not exist",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "description", "website", "application", "documentation", "support", "capabilities"],
        "properties": {
          "name": { "type": "string", "description": "Product name" },
          "description": { "type": "string", "description": "Concise product description" },
          "website": { "type": "string", "format": "uri", "description": "Canonical marketing website" },
          "application": { "type": "string", "format": "uri", "description": "Premier League application URL" },
          "documentation": { "type": "string", "format": "uri", "description": "Player-facing rules and documentation" },
          "support": { "type": "string", "format": "uri", "description": "Public support page" },
          "capabilities": {
            "type": "array",
            "description": "High-level Draft Fantasy game capabilities",
            "items": { "type": "string" }
          }
        }
      },
      "Problem": {
        "type": "object",
        "additionalProperties": true,
        "required": ["type", "title", "status", "detail", "code", "resolution"],
        "properties": {
          "type": { "type": "string", "format": "uri-reference" },
          "title": { "type": "string" },
          "status": { "type": "integer", "minimum": 400, "maximum": 599 },
          "detail": { "type": "string" },
          "code": { "type": "string" },
          "resolution": { "type": "string" },
          "instance": { "type": "string", "format": "uri-reference" }
        }
      }
    }
  }
}
