{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://magmijnhondmee.nl/schema/park.schema.json",
  "title": "Vakantiepark met hondenbeleid",
  "type": "object", "additionalProperties": false,
  "required": ["id","name","chain","plaats","gemeente","provincie","location","dogs_allowed","max_dogs","dog_fee","dog_accommodation","rules","nearby_beach_ids","booking_url","status","source_url","sources","checked_at"],
  "properties": {
    "id": {"type":"string","pattern":"^[a-z0-9-]+$"},
    "name": {"type":"string"},
    "chain": {"type":"string","description":"id van data/chains/<id>.json"},
    "plaats": {"type":"string"}, "gemeente": {"type":"string"},
    "provincie": {"$ref":"beach.schema.json#/properties/provincie"},
    "location": {"$ref":"beach.schema.json#/properties/location"},
    "dogs_allowed": {"enum":["yes","no","partly","unknown"],"description":"Op park-niveau, volgens park/ketenbron"},
    "max_dogs": {"type":["integer","null"],"description":"Alleen als de parkbron het noemt; anders null (zie keten)"},
    "dog_fee": {"$ref":"#/$defs/fee"},
    "dog_accommodation": {"type":"object","additionalProperties":false,"required":["types","count"],"properties":{"types":{"type":"array","items":{"type":"string"}},"count":{"type":["integer","null"]}}},
    "rules": {"type":"array","items":{"type":"string"}},
    "notes": {"type":"string"},
    "nearby_beach_ids": {"type":"array","items":{"type":"string"},"description":"Strand-id's in dezelfde gemeente/omgeving; geen afstandsclaim"},
    "booking_url": {"type":"string","format":"uri","description":"Officiële boekingspagina (geen affiliate)"},
    "status": {"enum":["verified","partial","unknown"]},
    "source_url": {"type":"string","format":"uri"},
    "sources": {"$ref":"beach.schema.json#/properties/sources"},
    "checked_at": {"type":"string","format":"date"}
  },
  "$defs": {"fee": {"oneOf":[{"type":"null"},{"type":"object","additionalProperties":false,"required":["amount","currency","per"],"properties":{"amount":{"type":["number","null"]},"currency":{"const":"EUR"},"per":{"enum":["dog_per_night","dog_per_stay","stay","unknown"]},"notes":{"type":"string"}}}]}}
}
