|
| 1 | +{ |
| 2 | + "$id": "https://example.com/schemas/MapState.json", |
| 3 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 4 | + "title": "MapState", |
| 5 | + "allOf": [ |
| 6 | + { |
| 7 | + "anyOf": [ |
| 8 | + { |
| 9 | + "type": "object", |
| 10 | + "properties": { |
| 11 | + "latitude": {"type": "number", "minimum": -90, "maximum": 90}, |
| 12 | + "longitude": {"type": "number", "minimum": -180, "maximum": 180}, |
| 13 | + "zoom": {"type": "number", "minimum": 0, "maximum": 25, "default": 0}, |
| 14 | + "bearing": {"type": "number"}, |
| 15 | + "pitch": {"type": "number", "minimum": 0, "exclusiveMaximum": 90}, |
| 16 | + "dragRotate": {"type": "boolean"}, |
| 17 | + "mapSplitMode": {"type": "string", "const": "SINGLE_MAP"}, |
| 18 | + "isSplit": {"type": "boolean", "const": false, "default": false} |
| 19 | + }, |
| 20 | + "required": ["latitude", "longitude", "pitch", "mapSplitMode"] |
| 21 | + }, |
| 22 | + { |
| 23 | + "type": "object", |
| 24 | + "properties": { |
| 25 | + "latitude": {"$ref": "#/allOf/0/anyOf/0/properties/latitude"}, |
| 26 | + "longitude": {"$ref": "#/allOf/0/anyOf/0/properties/longitude"}, |
| 27 | + "zoom": {"$ref": "#/allOf/0/anyOf/0/properties/zoom"}, |
| 28 | + "bearing": {"$ref": "#/allOf/0/anyOf/0/properties/bearing"}, |
| 29 | + "pitch": {"$ref": "#/allOf/0/anyOf/0/properties/pitch"}, |
| 30 | + "dragRotate": {"$ref": "#/allOf/0/anyOf/0/properties/dragRotate"}, |
| 31 | + "mapSplitMode": {"type": "string", "const": "SWIPE_COMPARE"}, |
| 32 | + "isSplit": {"type": "boolean", "const": true, "default": true} |
| 33 | + }, |
| 34 | + "required": ["latitude", "longitude", "pitch", "mapSplitMode"] |
| 35 | + } |
| 36 | + ] |
| 37 | + }, |
| 38 | + { |
| 39 | + "anyOf": [ |
| 40 | + { |
| 41 | + "type": "object", |
| 42 | + "properties": { |
| 43 | + "mapViewMode": {"type": "string", "const": "MODE_2D"} |
| 44 | + }, |
| 45 | + "required": ["mapViewMode"] |
| 46 | + }, |
| 47 | + { |
| 48 | + "type": "object", |
| 49 | + "properties": { |
| 50 | + "mapViewMode": {"type": "string", "const": "MODE_3D"} |
| 51 | + }, |
| 52 | + "required": ["mapViewMode"] |
| 53 | + } |
| 54 | + ] |
| 55 | + } |
| 56 | + ] |
| 57 | +} |
0 commit comments