{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kampyeri-org/json-schema/kampyeri-org-campsite-detail-schema.json",
  "title": "CampsiteDetail",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kampyeri-org-openapi.json#/components/schemas/CampsiteDetail",
  "allOf": [
    {
      "$ref": "#/$defs/CampsiteSummary"
    },
    {
      "type": "object",
      "properties": {
        "features_by_category": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "CampsiteSummary": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": [
            "string",
            "null"
          ]
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "features": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "area_types": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "summary": {
          "type": [
            "string",
            "null"
          ]
        },
        "rating": {
          "type": [
            "number",
            "null"
          ]
        },
        "review_count": {
          "type": [
            "integer",
            "null"
          ]
        },
        "price_from": {
          "$ref": "#/$defs/PriceFrom"
        },
        "canonical_url": {
          "type": "string",
          "format": "uri"
        },
        "booking_url": {
          "type": "string",
          "format": "uri"
        },
        "updated_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    },
    "PriceFrom": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "amount": {
          "type": "number"
        },
        "unit": {
          "type": "string",
          "enum": [
            "per_night",
            "per_person"
          ]
        },
        "currency": {
          "type": "string"
        }
      }
    }
  }
}