{
 "openapi": "3.0.3",
 "info": {
  "title": "LakeTahoeCampgrounds.com campgrounds API",
  "version": "1.0.0",
  "description": "Read-only, sourced campground facts for Lake Tahoe: official RV limits, hookups, dog rules, booking systems and windows, lakefront flags. No authentication, no live availability. Responses are cached (s-maxage 3600). Editorial and verification policy: https://laketahoecampgrounds.com/editorial-policy."
 },
 "servers": [
  {
   "url": "https://laketahoecampgrounds.com/"
  }
 ],
 "paths": {
  "/api/v1/campgrounds": {
   "get": {
    "summary": "List campgrounds with sourced attributes",
    "parameters": [
     {
      "name": "rig_length",
      "in": "query",
      "schema": {
       "type": "number"
      },
      "description": "Rig length in feet: keep campgrounds whose maxRigLength is at least this (no-RV campgrounds are dropped; unknown lengths too unless include_unknown_length=true)."
     },
     {
      "name": "include_unknown_length",
      "in": "query",
      "schema": {
       "type": "boolean"
      },
      "description": "With rig_length: also keep campgrounds with no published length."
     },
     {
      "name": "hookups",
      "in": "query",
      "schema": {
       "type": "string",
       "description": "full, partial, none, or electric (= full or partial)",
       "enum": [
        "full",
        "partial",
        "none",
        "electric"
       ]
      }
     },
     {
      "name": "section",
      "in": "query",
      "schema": {
       "type": "string",
       "description": "Shore/section key",
       "enum": [
        "south-lake-tahoe",
        "west-shore-emerald-bay",
        "north-shore",
        "truckee-donner",
        "stateline-zephyr-cove",
        "east-shore-incline",
        "nearby-us50-west",
        "nearby-hope-valley",
        "nearby-sierraville",
        "nearby-west-crest",
        "nearby-i80-west",
        "nearby-reno-carson"
       ]
      },
      "description": "Alias: shore."
     },
     {
      "name": "state",
      "in": "query",
      "schema": {
       "type": "string",
       "description": "State code",
       "enum": [
        "CA",
        "NV"
       ]
      }
     },
     {
      "name": "agency",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Case-insensitive substring of the agency/operator name, e.g. \"state parks\", \"forest service\", \"private\"."
     },
     {
      "name": "dogs",
      "in": "query",
      "schema": {
       "type": "string",
       "description": "allowed, restricted, not-allowed, or yes (= allowed or restricted)",
       "enum": [
        "allowed",
        "restricted",
        "not-allowed",
        "yes"
       ]
      }
     },
     {
      "name": "booking",
      "in": "query",
      "schema": {
       "type": "string",
       "description": "Booking engine",
       "enum": [
        "reservecalifornia",
        "recreation-gov",
        "reservenevada",
        "operator",
        "first-come"
       ]
      }
     },
     {
      "name": "lakefront",
      "in": "query",
      "schema": {
       "type": "string",
       "description": "on-shore, lake-side, short-walk, or any (= on-shore or lake-side)",
       "enum": [
        "on-shore",
        "lake-side",
        "short-walk",
        "any"
       ]
      }
     },
     {
      "name": "core_only",
      "in": "query",
      "schema": {
       "type": "boolean"
      },
      "description": "Only the lake sections (drop nearby-* areas)."
     }
    ],
    "responses": {
     "200": {
      "description": "Matching campgrounds",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CampgroundList"
        }
       }
      }
     },
     "400": {
      "description": "Invalid parameter",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Source": {
    "type": "object",
    "nullable": true,
    "properties": {
     "name": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "checked": {
      "type": "string"
     }
    }
   },
   "Attributes": {
    "type": "object",
    "description": "Typed, sourced fields.",
    "properties": {
     "agency": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "Managing agency or operator and its official page ({name, url}); private parks name the operator and link the listing."
     },
     "bookingEngine": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "reservecalifornia | recreation-gov | reservenevada | operator | first-come, with the page that states it."
     },
     "bookingWindow": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "Official booking window in words (e.g. 6 months to the day; 8 a.m. PT), with source."
     },
     "maxRigLength": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "Feet. basis=official: the agency's published maximum camper/motorhome length; basis=recgov-sites: no agency limit is published, so the longest equipment length Recreation.gov lists for at least two sites. value null = the source says no RVs (tent-only, walk-in, boat-in)."
     },
     "maxTrailerLength": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "Feet: official maximum trailer length, where the agency publishes one separately."
     },
     "pullThrough": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "Number of pull-through sites Recreation.gov lists."
     },
     "hookups": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "full (water, electric and sewer) | partial (some of them) | none, with source; private parks cite their booking listing."
     },
     "dogPolicy": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "allowed (in the campground) | restricted (campground only; banned from beaches/trails) | not-allowed, with the official wording."
     },
     "isLakefront": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "on-shore (sites on the shoreline) | lake-side (lake side of the road or park lake frontage) | short-walk (lake nearby, sites not on the shore) | no. From official descriptions or Recreation.gov's Lakefront site flag only."
     },
     "tentOnly": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "true when every site is a tent site per the official page or Recreation.gov."
     },
     "walkIn": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "true when sites are walk-in (walk-to)."
     },
     "generators": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "Generator hours where the agency publishes them."
     },
     "bearStorage": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "Food-storage rule or locker details (dimensions only where the agency states them)."
     },
     "firstCome": {
      "type": "object",
      "nullable": true,
      "properties": {
       "value": {},
       "text": {
        "type": "string"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      },
      "description": "First-come, first-served rule or season, from the official page."
     }
    }
   },
   "Campground": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "areaType": {
      "type": "string"
     },
     "manager": {
      "type": "string",
      "nullable": true
     },
     "coordinates": {
      "type": "object",
      "nullable": true
     },
     "officialRvLimitFt": {
      "type": "object",
      "nullable": true
     },
     "hookups": {
      "type": "object"
     },
     "season": {
      "type": "object",
      "nullable": true
     },
     "booking": {
      "type": "object",
      "nullable": true
     },
     "state": {
      "type": "string"
     },
     "section": {
      "type": "string",
      "nullable": true
     },
     "attributes": {
      "$ref": "#/components/schemas/Attributes"
     }
    }
   },
   "CampgroundList": {
    "type": "object",
    "properties": {
     "count": {
      "type": "integer"
     },
     "generatedAt": {
      "type": "string"
     },
     "filters": {
      "type": "object"
     },
     "campgrounds": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Campground"
      }
     }
    }
   }
  }
 }
}