{
 "openapi": "3.1.0",
 "info": {
  "title": "The Backroom Brief archive",
  "version": "1.0.0",
  "description": "Read-only static endpoints. No authentication. Nothing here is financial advice."
 },
 "servers": [
  {
   "url": "https://briefsroom.com"
  }
 ],
 "paths": {
  "/issues.json": {
   "get": {
    "summary": "Every published issue, newest first",
    "responses": {
     "200": {
      "description": "Issue index",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/status.json": {
   "get": {
    "summary": "Build status and the latest issue date",
    "responses": {
     "200": {
      "description": "Status",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/{year}/{month}/{day}/": {
   "get": {
    "summary": "One issue. Send Accept: text/markdown for a markdown version",
    "responses": {
     "200": {
      "description": "The issue page",
      "content": {
       "text/html": {}
      }
     }
    },
    "parameters": [
     {
      "name": "year",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9]{4}$"
      }
     },
     {
      "name": "month",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9]{2}$"
      }
     },
     {
      "name": "day",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9]{2}$"
      }
     }
    ]
   }
  },
  "/{year}/{month}/{day}/beginner/": {
   "get": {
    "summary": "The plain-English Beginner Edition of one issue",
    "responses": {
     "200": {
      "description": "The Beginner Edition page",
      "content": {
       "text/html": {}
      }
     }
    },
    "parameters": [
     {
      "name": "year",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9]{4}$"
      }
     },
     {
      "name": "month",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9]{2}$"
      }
     },
     {
      "name": "day",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9]{2}$"
      }
     }
    ]
   }
  },
  "/pdf/{file}": {
   "get": {
    "summary": "An issue PDF, named morning-brief-YYYY-MM-DD.pdf or -beginner.pdf",
    "responses": {
     "200": {
      "description": "The PDF",
      "content": {
       "application/pdf": {}
      }
     }
    },
    "parameters": [
     {
      "name": "file",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^morning-brief-[0-9]{4}-[0-9]{2}-[0-9]{2}(-beginner)?\\.pdf$"
      }
     }
    ]
   }
  },
  "/feed.xml": {
   "get": {
    "summary": "RSS feed of recent issues",
    "responses": {
     "200": {
      "description": "RSS 2.0 feed",
      "content": {
       "application/rss+xml": {}
      }
     }
    }
   }
  }
 }
}
