{
  "openapi": "3.1.0",
  "info": {
    "title": "yohei.me Public Build Archive",
    "version": "1.0.0",
    "description": "A free, read-only static API for Yohei Nakajima's explicitly public build records. No authentication or API key is required."
  },
  "servers": [{"url": "https://yohei.me"}],
  "paths": {
    "/data/manifest.json": {
      "get": {
        "operationId": "getProjectManifest",
        "summary": "List public project data files",
        "responses": {
          "200": {
            "description": "Project manifest",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Manifest"}}}
          }
        }
      }
    },
    "/data/projects-{year}.json": {
      "get": {
        "operationId": "getProjectsByYear",
        "summary": "Get public projects for one year",
        "parameters": [{
          "name": "year",
          "in": "path",
          "required": true,
          "schema": {"type": "integer", "enum": [2020, 2021, 2022, 2023, 2024, 2025, 2026]}
        }],
        "responses": {
          "200": {
            "description": "Public projects for the selected year",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProjectCollection"}}}
          },
          "404": {"description": "Year file not found"}
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getAgentGuide",
        "summary": "Get the concise AI-readable site guide",
        "responses": {"200": {"description": "Markdown guide", "content": {"text/plain": {"schema": {"type": "string"}}}}}
      }
    }
  },
  "components": {
    "schemas": {
      "Manifest": {
        "type": "object",
        "required": ["generatedAt", "source", "files"],
        "properties": {
          "generatedAt": {"type": "string", "format": "date-time"},
          "source": {"type": "string"},
          "featuredLimit": {"type": "integer"},
          "files": {"type": "array", "items": {"type": "string"}}
        }
      },
      "ProjectCollection": {
        "type": "object",
        "required": ["projects"],
        "properties": {"projects": {"type": "array", "items": {"$ref": "#/components/schemas/Project"}}}
      },
      "Project": {
        "type": "object",
        "required": ["id", "name", "description", "date", "url", "types", "formats", "categories"],
        "properties": {
          "id": {"type": "string"},
          "name": {"type": "string"},
          "displayName": {"type": "string"},
          "description": {"type": "string"},
          "date": {"type": "string", "format": "date"},
          "url": {"type": "string", "format": "uri"},
          "types": {"type": "array", "items": {"type": "string"}},
          "formats": {"type": "array", "items": {"type": "string"}},
          "categories": {"type": "array", "items": {"type": "string"}},
          "featured": {"type": "boolean"},
          "featuredRank": {"type": "integer"},
          "links": {"type": "array", "items": {"type": "object", "properties": {"label": {"type": "string"}, "url": {"type": "string", "format": "uri"}}}}
        }
      }
    }
  }
}
