{
  "openapi": "3.1.0",
  "info": {
    "title": "bayanimills.com public read-only API",
    "version": "1.0.0",
    "description": "The two public, unauthenticated, read-only endpoints that feed the home page of bayanimills.com. Everything else under /api is private."
  },
  "servers": [{ "url": "https://bayanimills.com" }],
  "paths": {
    "/api/projects/": {
      "get": {
        "operationId": "listProjects",
        "summary": "List public projects",
        "responses": {
          "200": {
            "description": "Projects, ordered for display",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Project" } }
              }
            }
          }
        }
      }
    },
    "/api/media/": {
      "get": {
        "operationId": "listMedia",
        "summary": "List media appearances",
        "responses": {
          "200": {
            "description": "Interviews and podcasts, ordered for display",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MediaItem" } }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Project": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "name": { "type": "string" },
          "role": { "type": "string" },
          "description": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "cta": { "type": "string" },
          "logo": { "type": ["string", "null"] },
          "order": { "type": "integer" }
        }
      },
      "MediaItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "title": { "type": "string" },
          "show": { "type": "string" },
          "description": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "type": { "type": "string", "enum": ["video", "podcast"] },
          "thumbnail": { "type": "string" },
          "order": { "type": "integer" }
        }
      }
    }
  }
}
