{
 "openapi": "3.1.0",
 "info": {
  "title": "Atlas of Plant Based PCT data",
  "version": "1.0.0",
  "description": "Read-only Pacific Crest Trail reference data from atlasofplantbased.com: the 26 resupply-to-resupply legs with trail miles, vegan resupply at each common stop, and the towns, passes and lakes along the line with mile, coordinates and elevation. Static JSON, no key, no rate plan.",
  "contact": {
   "name": "Atlas of Plant Based",
   "url": "https://atlasofplantbased.com/about/"
  }
 },
 "servers": [
  {
   "url": "https://atlasofplantbased.com"
  }
 ],
 "externalDocs": {
  "url": "https://atlasofplantbased.com/api/"
 },
 "paths": {
  "/api/pct/legs.json": {
   "get": {
    "operationId": "getPctLegs",
    "summary": "The 26 PCT legs with trail miles",
    "responses": {
     "200": {
      "description": "Legs",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "author": {
           "type": "string"
          },
          "notes": {
           "type": "string"
          },
          "license": {
           "type": "string"
          },
          "updated": {
           "type": "string",
           "format": "date"
          },
          "legs": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "leg": {
              "type": "integer"
             },
             "title": {
              "type": "string"
             },
             "section": {
              "type": "string"
             },
             "trailMileStart": {
              "type": "number"
             },
             "trailMileEnd": {
              "type": "number"
             },
             "trailMiles": {
              "type": "number"
             },
             "trackedMiles2021": {
              "type": [
               "number",
               "null"
              ]
             },
             "days2021": {
              "type": [
               "string",
               "null"
              ]
             },
             "dates2021": {
              "type": [
               "string",
               "null"
              ]
             },
             "url": {
              "type": "string",
              "format": "uri"
             }
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/pct/resupply.json": {
   "get": {
    "operationId": "getPctVeganResupply",
    "summary": "Vegan resupply at each PCT stop, with the date each was last checked",
    "responses": {
     "200": {
      "description": "Resupply stops",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "author": {
           "type": "string"
          },
          "notes": {
           "type": "string"
          },
          "license": {
           "type": "string"
          },
          "updated": {
           "type": "string",
           "format": "date"
          },
          "printable": {
           "type": "string"
          },
          "stops": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "town": {
              "type": "string"
             },
             "trailMile": {
              "type": "number"
             },
             "leg": {
              "type": [
               "integer",
               "null"
              ]
             },
             "storeType": {
              "type": "string"
             },
             "veganOptions": {
              "type": "string"
             },
             "mailDrop": {
              "type": "string",
              "enum": [
               "yes",
               "advised",
               "no"
              ]
             },
             "lastVerified": {
              "type": "string",
              "format": "date"
             }
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/pct/points.json": {
   "get": {
    "operationId": "getPctPoints",
    "summary": "Towns, passes and lakes along the PCT by trail mile",
    "responses": {
     "200": {
      "description": "Points",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "author": {
           "type": "string"
          },
          "notes": {
           "type": "string"
          },
          "license": {
           "type": "string"
          },
          "updated": {
           "type": "string",
           "format": "date"
          },
          "points": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "kind": {
              "type": "string",
              "enum": [
               "town",
               "pass",
               "water",
               "peak",
               "place"
              ]
             },
             "trailMile": {
              "type": "number"
             },
             "lat": {
              "type": "number"
             },
             "lon": {
              "type": "number"
             },
             "trailElevationFt": {
              "type": "integer"
             },
             "section": {
              "type": "string"
             },
             "leg": {
              "type": [
               "integer",
               "null"
              ]
             },
             "url": {
              "type": "string",
              "format": "uri"
             }
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
  }
 }
}