{
	"$id": "https://mapliberator.com/spec/1.0-draft/schemas/waypoints.schema.json",
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"type": "object",
	"properties": {
		"type": {
			"type": "string",
			"const": "FeatureCollection"
		},
		"features": {
			"type": "array",
			"items": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"const": "Feature"
					},
					"id": {
						"type": "string",
						"pattern": "^waypoint\\/[0-9]{6,}$",
						"description": "Archive-local ID: \"waypoint/<sequence>\""
					},
					"geometry": {
						"type": "object",
						"properties": {
							"type": {
								"type": "string",
								"const": "Point"
							},
							"coordinates": {
								"minItems": 2,
								"maxItems": 3,
								"type": "array",
								"items": {
									"type": "number"
								},
								"description": "[longitude, latitude, elevationMeters?] in WGS84 (RFC 7946 order)"
							}
						},
						"required": [
							"type",
							"coordinates"
						],
						"additionalProperties": {}
					},
					"properties": {
						"type": "object",
						"properties": {
							"name": {
								"type": "string"
							},
							"description": {
								"type": [
									"string",
									"null"
								]
							},
							"createdAt": {
								"anyOf": [
									{
										"type": "string",
										"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?Z$",
										"description": "RFC 3339 timestamp, UTC"
									},
									{
										"type": "null"
									}
								]
							},
							"updatedAt": {
								"anyOf": [
									{
										"type": "string",
										"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?Z$",
										"description": "RFC 3339 timestamp, UTC"
									},
									{
										"type": "null"
									}
								]
							},
							"visibility": {
								"anyOf": [
									{
										"type": "string",
										"enum": [
											"private",
											"unlisted",
											"public"
										]
									},
									{
										"type": "null"
									}
								]
							},
							"tags": {
								"type": "array",
								"items": {
									"type": "string"
								}
							},
							"source": {
								"type": "object",
								"properties": {
									"platform": {
										"type": "string",
										"minLength": 1
									},
									"id": {
										"type": "string"
									},
									"url": {
										"type": [
											"string",
											"null"
										]
									},
									"raw": {
										"description": "Scrubbed source representation; only when requested"
									}
								},
								"required": [
									"platform",
									"id"
								],
								"additionalProperties": {}
							},
							"icon": {
								"type": [
									"string",
									"null"
								]
							}
						},
						"required": [
							"name",
							"source"
						],
						"additionalProperties": {}
					}
				},
				"required": [
					"type",
					"id",
					"geometry",
					"properties"
				],
				"additionalProperties": {}
			}
		}
	},
	"required": [
		"type",
		"features"
	],
	"additionalProperties": {},
	"description": "waypoints/waypoints.geojson"
}
