{
  "openapi": "3.1.0",
  "info": {
    "title": "boplog Public Build Archive",
    "version": "1.0.0",
    "description": "A free, read-only static API for Kevin Rajan's public GitHub repositories he has committed to. No authentication or API key is required."
  },
  "servers": [{"url": "https://kvnloo.github.io/boplog"}],
  "paths": {
    "/data/manifest.json": {
      "get": {
        "summary": "List public project data files",
        "operationId": "getManifest",
        "responses": {
          "200": {
            "description": "Manifest of year-partitioned project files",
            "content": {
              "application/json": {
                "schema": {"$ref": "#/components/schemas/Manifest"}
              }
            }
          }
        }
      }
    },
    "/data/projects-{year}.json": {
      "get": {
        "summary": "Get public projects for one year",
        "operationId": "getProjectsByYear",
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {"type": "string", "pattern": "^[0-9]{4}$"}
          }
        ],
        "responses": {
          "200": {
            "description": "Projects for the requested year",
            "content": {
              "application/json": {
                "schema": {"$ref": "#/components/schemas/YearFile"}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Manifest": {
        "type": "object",
        "required": ["generatedAt", "source", "files"],
        "properties": {
          "generatedAt": {"type": "string", "format": "date-time"},
          "source": {"type": "string"},
          "featuredLimit": {"type": "integer"},
          "user": {"type": "string"},
          "files": {"type": "array", "items": {"type": "string"}}
        }
      },
      "YearFile": {
        "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"},
          "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"},
          "eyebrow": {"type": "string"},
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["label", "url"],
              "properties": {
                "label": {"type": "string"},
                "url": {"type": "string", "format": "uri"}
              }
            }
          }
        }
      }
    }
  }
}
