{
  "sources": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "title": {
        "type": "string"
      },
      "url": {
        "type": "string",
        "format": "uri"
      },
      "archiveUrl": {
        "type": "string",
        "format": "uri"
      },
      "publisher": {
        "type": "string"
      },
      "author": {
        "type": "string"
      },
      "publishedOn": {},
      "accessedOn": {},
      "kind": {
        "type": "string",
        "enum": [
          "official",
          "news",
          "book",
          "journal",
          "website",
          "wiki",
          "dataset",
          "flight-log",
          "video",
          "social",
          "interview",
          "community"
        ]
      },
      "language": {
        "default": "en",
        "type": "string"
      },
      "notes": {
        "type": "string"
      }
    },
    "required": [
      "title",
      "publisher",
      "accessedOn",
      "kind"
    ]
  },
  "peaks": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "name": {
        "type": "string"
      },
      "nameNe": {
        "type": "string"
      },
      "altNames": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "elevationM": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "summit": {
        "type": "object",
        "properties": {
          "lat": {
            "type": "number",
            "minimum": 26,
            "maximum": 31
          },
          "lon": {
            "type": "number",
            "minimum": 80,
            "maximum": 89
          },
          "elevationM": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "lat",
          "lon"
        ]
      },
      "range": {
        "type": "string"
      },
      "district": {
        "type": "string"
      },
      "is8000er": {
        "type": "boolean"
      },
      "climbingStatus": {
        "type": "string",
        "enum": [
          "open",
          "closed",
          "restricted"
        ]
      },
      "firstAscent": {
        "type": "object",
        "properties": {
          "date": {},
          "year": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "by": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "year"
        ]
      },
      "summary": {
        "type": "string"
      },
      "sources": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      },
      "fieldSources": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      },
      "verification": {
        "type": "string",
        "enum": [
          "verified",
          "single-source",
          "unverified"
        ]
      },
      "reviewedOn": {},
      "notes": {
        "type": "string"
      }
    },
    "required": [
      "name",
      "elevationM",
      "summit",
      "range",
      "is8000er",
      "climbingStatus",
      "summary",
      "verification",
      "reviewedOn"
    ]
  },
  "sites": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "name": {
        "type": "string"
      },
      "nameNe": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "enum": [
          "site",
          "launch",
          "summit"
        ]
      },
      "peak": {
        "type": "string",
        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
      },
      "status": {
        "default": "active",
        "type": "string",
        "enum": [
          "active",
          "suspended",
          "historical",
          "unknown"
        ]
      },
      "uses": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "commercial",
            "tandem",
            "solo",
            "training",
            "high-altitude",
            "siv",
            "hike-and-fly"
          ]
        }
      },
      "takeoff": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "lat": {
            "type": "number",
            "minimum": 26,
            "maximum": 31
          },
          "lon": {
            "type": "number",
            "minimum": 80,
            "maximum": 89
          },
          "elevationM": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "country": {
            "description": "ISO 3166-1 alpha-2, when not NP",
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "precision": {
            "default": "exact",
            "type": "string",
            "enum": [
              "exact",
              "locality"
            ]
          }
        }
      },
      "altTakeoffs": {
        "default": [],
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "lat": {
              "type": "number",
              "minimum": 26,
              "maximum": 31
            },
            "lon": {
              "type": "number",
              "minimum": 80,
              "maximum": 89
            },
            "elevationM": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "lat",
            "lon",
            "name"
          ]
        }
      },
      "landings": {
        "default": [],
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "lat": {
              "type": "number",
              "minimum": 26,
              "maximum": 31
            },
            "lon": {
              "type": "number",
              "minimum": 80,
              "maximum": 89
            },
            "elevationM": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "country": {
              "description": "ISO 3166-1 alpha-2, when not NP",
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          },
          "required": [
            "name"
          ]
        }
      },
      "district": {
        "type": "string"
      },
      "province": {
        "type": "string"
      },
      "airspace": {
        "type": "object",
        "properties": {
          "zone": {
            "type": "string"
          },
          "ceilingFt": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "ceilingNote": {
            "type": "string"
          },
          "hours": {
            "type": "string"
          },
          "aipPage": {
            "type": "string"
          }
        },
        "required": [
          "zone"
        ]
      },
      "windDirections": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "N",
            "NE",
            "E",
            "SE",
            "S",
            "SW",
            "W",
            "NW"
          ]
        }
      },
      "bestMonths": {
        "default": [],
        "type": "array",
        "items": {
          "type": "integer",
          "minimum": 1,
          "maximum": 12
        }
      },
      "access": {
        "type": "string"
      },
      "clubs": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "firstFlown": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "by": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "year"
        ]
      },
      "summary": {
        "type": "string"
      },
      "sources": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      },
      "fieldSources": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      },
      "verification": {
        "type": "string",
        "enum": [
          "verified",
          "single-source",
          "unverified"
        ]
      },
      "reviewedOn": {},
      "notes": {
        "type": "string"
      }
    },
    "required": [
      "name",
      "kind",
      "takeoff",
      "summary",
      "verification",
      "reviewedOn"
    ]
  },
  "pilots": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "name": {
        "type": "string"
      },
      "nameNe": {
        "type": "string"
      },
      "nationality": {
        "type": "string",
        "minLength": 2,
        "maxLength": 2,
        "description": "ISO 3166-1 alpha-2"
      },
      "hometown": {
        "type": "string"
      },
      "flyingSince": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "disciplines": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "xc",
            "tandem",
            "acro",
            "hike-and-fly",
            "summit",
            "competition",
            "instructor"
          ]
        }
      },
      "appi": {
        "type": "object",
        "properties": {
          "licence": {
            "type": "string"
          },
          "rating": {
            "type": "string"
          },
          "memberSince": {}
        },
        "required": [
          "licence"
        ]
      },
      "bornAbout": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "civl": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "rankingDate": {},
          "rankings": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "discipline": {
                  "type": "string",
                  "enum": [
                    "accuracy",
                    "xc",
                    "xc-sport",
                    "hike-and-fly",
                    "acro"
                  ]
                },
                "nepal": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "world": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "points": {
                  "type": "number"
                }
              },
              "required": [
                "discipline",
                "nepal"
              ]
            }
          }
        },
        "required": [
          "id",
          "rankingDate"
        ]
      },
      "results": {
        "default": [],
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "event": {
              "type": "string"
            },
            "date": {},
            "place": {
              "type": "string"
            },
            "discipline": {
              "default": "accuracy",
              "type": "string",
              "enum": [
                "accuracy",
                "xc",
                "hike-and-fly",
                "other"
              ]
            },
            "team": {
              "default": false,
              "type": "boolean"
            },
            "rank": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "fieldSize": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "score": {
              "type": "string"
            },
            "sources": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
              }
            }
          },
          "required": [
            "event",
            "date"
          ]
        }
      },
      "links": {
        "default": {},
        "type": "object",
        "properties": {
          "xcontest": {
            "type": "string",
            "format": "uri"
          },
          "website": {
            "type": "string",
            "format": "uri"
          },
          "instagram": {
            "type": "string",
            "format": "uri"
          },
          "youtube": {
            "type": "string",
            "format": "uri"
          },
          "civl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "bio": {
        "type": "string"
      },
      "sources": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      },
      "fieldSources": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      },
      "verification": {
        "type": "string",
        "enum": [
          "verified",
          "single-source",
          "unverified"
        ]
      },
      "reviewedOn": {},
      "notes": {
        "type": "string"
      }
    },
    "required": [
      "name",
      "nationality",
      "bio",
      "verification",
      "reviewedOn"
    ]
  },
  "flights": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "title": {
        "type": "string"
      },
      "date": {},
      "year": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "pilots": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      },
      "pilotNames": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "tandem": {
        "default": false,
        "type": "boolean"
      },
      "kind": {
        "type": "string",
        "enum": [
          "summit",
          "xc",
          "record",
          "expedition",
          "first-flight",
          "other"
        ]
      },
      "outcome": {
        "default": "completed",
        "type": "string",
        "enum": [
          "completed",
          "attempted",
          "unknown"
        ]
      },
      "permitted": {
        "type": "boolean"
      },
      "launchPoint": {
        "description": "e.g. \"summit\", \"South Col\", \"Camp III\"",
        "type": "string"
      },
      "launchAltitudeM": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "peak": {
        "type": "string",
        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
      },
      "site": {
        "type": "string",
        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
      },
      "takeoff": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "lat": {
            "type": "number",
            "minimum": 26,
            "maximum": 31
          },
          "lon": {
            "type": "number",
            "minimum": 80,
            "maximum": 89
          },
          "elevationM": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "country": {
            "description": "ISO 3166-1 alpha-2, when not NP",
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          }
        }
      },
      "landing": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "lat": {
            "type": "number",
            "minimum": 26,
            "maximum": 31
          },
          "lon": {
            "type": "number",
            "minimum": 80,
            "maximum": 89
          },
          "elevationM": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "country": {
            "description": "ISO 3166-1 alpha-2, when not NP",
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          }
        }
      },
      "distanceKm": {
        "type": "number"
      },
      "durationMin": {
        "type": "number"
      },
      "maxAltitudeM": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "glider": {
        "type": "string"
      },
      "xcontestId": {
        "type": "string"
      },
      "trackUrl": {
        "type": "string",
        "format": "uri"
      },
      "summary": {
        "type": "string"
      },
      "sources": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      },
      "fieldSources": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      },
      "verification": {
        "type": "string",
        "enum": [
          "verified",
          "single-source",
          "unverified"
        ]
      },
      "reviewedOn": {},
      "notes": {
        "type": "string"
      }
    },
    "required": [
      "title",
      "year",
      "kind",
      "summary",
      "verification",
      "reviewedOn"
    ]
  },
  "records": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "title": {
        "type": "string"
      },
      "category": {
        "type": "string",
        "enum": [
          "distance",
          "altitude",
          "duration",
          "speed",
          "gain",
          "first",
          "competition",
          "other"
        ]
      },
      "scope": {
        "type": "string",
        "enum": [
          "world",
          "continental",
          "national",
          "site"
        ]
      },
      "value": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number"
          },
          "unit": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "unit"
        ]
      },
      "date": {},
      "year": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "holders": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      },
      "holderNames": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "flight": {
        "type": "string",
        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
      },
      "status": {
        "type": "string",
        "enum": [
          "current",
          "superseded",
          "claimed"
        ]
      },
      "supersededBy": {
        "type": "string",
        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
      },
      "ratifiedBy": {
        "type": "string"
      },
      "summary": {
        "type": "string"
      },
      "sources": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      },
      "fieldSources": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      },
      "verification": {
        "type": "string",
        "enum": [
          "verified",
          "single-source",
          "unverified"
        ]
      },
      "reviewedOn": {},
      "notes": {
        "type": "string"
      }
    },
    "required": [
      "title",
      "category",
      "scope",
      "year",
      "status",
      "summary",
      "verification",
      "reviewedOn"
    ]
  },
  "permits": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "title": {
        "type": "string"
      },
      "appliesTo": {
        "default": [],
        "description": "peak ids, empty = general",
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      },
      "authorities": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "steps": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "detail": {
              "type": "string"
            },
            "sources": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
              }
            }
          },
          "required": [
            "title",
            "detail"
          ]
        }
      },
      "fees": {
        "type": "string"
      },
      "timeline": {
        "default": [],
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "date": {},
            "text": {
              "type": "string"
            },
            "sources": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
              }
            }
          },
          "required": [
            "date",
            "text"
          ]
        }
      },
      "validAsOf": {},
      "summary": {
        "type": "string"
      },
      "sources": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      },
      "fieldSources": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      },
      "verification": {
        "type": "string",
        "enum": [
          "verified",
          "single-source",
          "unverified"
        ]
      },
      "reviewedOn": {},
      "notes": {
        "type": "string"
      }
    },
    "required": [
      "title",
      "authorities",
      "steps",
      "validAsOf",
      "summary",
      "verification",
      "reviewedOn"
    ]
  },
  "photos": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "file": {
        "type": "string"
      },
      "url": {
        "type": "string",
        "format": "uri"
      },
      "caption": {
        "type": "string"
      },
      "author": {
        "type": "string"
      },
      "license": {
        "type": "string",
        "description": "SPDX id or \"permission\" or \"unknown\""
      },
      "licenseUrl": {
        "type": "string",
        "format": "uri"
      },
      "permission": {
        "type": "string"
      },
      "sourceUrl": {
        "type": "string",
        "format": "uri"
      },
      "takenOn": {},
      "subjects": {
        "default": [],
        "description": "ids of pilots, sites, peaks or flights shown",
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      },
      "reviewedOn": {}
    },
    "required": [
      "caption",
      "author",
      "license",
      "reviewedOn"
    ]
  }
}
