{
	"title": "Path",
	"type": "string",
	"anyOf": [
		{"title": "Absolute Path (Windows)", "pattern": "^[a-zA-Z]:\\\\([^\\\\<>:\"/\\\\|?*]+\\\\)*[^\\\\<>:\"/\\\\|?*]*$"},
		{"title": "Absolute Path (*NIX)", "pattern": "^/([^/\\0]+(/([^/\\0]+))*)*/?$"},
		{"title": "UNC Share Path", "pattern": "^\\\\\\\\[^\\\\/:*?\"<>|\\r\\n]+\\\\[^\\\\/:*?\"<>|\\r\\n]+(\\\\[^\\\\/:*?\"<>|\\r\\n]+)*$"}
	]
}

    	"$defs": {
			"fs": {
				"windows": {
					"absolutePath": {
						"title": "Absolute Path (Windows)",
						"description": "absolute path for windows systems",
						"type": "string",
						"pattern": "^[a-zA-Z]:\\\\([^\\\\<>:\"/\\\\|?*]+\\\\)*[^\\\\<>:\"/\\\\|?*]*$"
					 }
				},
				"nix": {
					"absolutePath": {
						"title": "Absolute Path (*NIX)",
						"description": "absolute path for *nix systems",
						"type": "string",
						"pattern": "^/([^/\\0]+(/([^/\\0]+))*)*/?$"
					 }
				}
			},
			"geo": {
				"bearing": {
					"title": "Bearing",
					"description": "angle in degrees from the north line (0 degrees) between -180 and 180 degrees (positive clockwise)",
					"type": "integer",
					"minimum": -180,
					"maximum": 180
				},
				"elevation": {
					"title": "Elevation",
					"description": "feet units",
					"type": "integer"
				},
				"latitude": {
					"title": "Latitude",
					"type": "number",
					"minimum": -90,
					"maximum": 90
				},
				"longitude": {
					"title": "Longitude",
					"type": "number",
					"maximum": 180,
					"minimum": -180
				},
				"point": {
					"title": "Point",
					"description": "geographical point with elevation",
					"type": "object",
					"required": ["latitude", "longitude"],
					"properties": {
						"latitude": {
							"$ref": "#/$defs/geo/latitude"
						},
						"longitude": {
							"$ref": "#/$defs/geo/longitude"
						}
					}
				}
			},
			"locations": {
				"id": {
					"title": "Id",
					"description": "UUID V5 string using url 'https://htk.ttscloud.net/locations/' (597e55dc-da70-5f5b-abdc-1fd449e7d4b7)",
					"type": "string",
					"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-5[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
				},
				"location": {
					"title": "Location",
					"type": "object",
					"required": ["id"],
					"allOf": [
						{"$ref": "#/$defs/geo/point"}
					],
					"properties": {
						"id": {
							"$ref": "#/$defs/locations/id"
						},
						"name": {
							"title": "Name",
							"type": "string"
						},
						"elevation": {
							"$ref": "#/$defs/geo/elevation"
						},
						"bearing": {
							"$ref": "#/$defs/geo/bearing"
						},
						"folders": {
							"title": "Folders",
							"$ref": "#/$defs/path"
							
						}
					}
				}
			},
			"net": {
				"unc": {
					"title": "UNC Path",
					"description": "Universal Naming Convention (UNC) path for network shares",
					"type": "string",
					"pattern": "^\\\\\\\\[^\\\\/:*?\"<>|\\r\\n]+\\\\[^\\\\/:*?\"<>|\\r\\n]+(\\\\[^\\\\/:*?\"<>|\\r\\n]+)*$"
				},
				"uri": {
					"title": "URI",
					"type": "string",
					"format": "uri"
				}
			},
			"path": {
				"title": "Path",
				"description": "resource path",
				"type": "string",
				"anyOf": [
					{"$ref": "http://schema.ttscloud.us/htk/fs.json#/%24defs/windows/absolutePath"},
					{"$ref": "http://schema.ttscloud.us/htk/fs.json#/%24defs/nix/absolutePath"},
					{"$ref": "#/$defs/net/unc"},
					{"$ref": "#/$defs/net/uri"}
				]
			}
    	}
    }