|
3 | 3 | "$id": "https://stac-extensions.github.io/storage/v1.0.0/schema.json", |
4 | 4 | "title": "Storage Extension", |
5 | 5 | "description": "STAC Storage Extension to a STAC Item and STAC Assets.", |
| 6 | + "oneOf": [ |
| 7 | + { |
| 8 | + "$comment": "This is the schema for STAC Items.", |
| 9 | + "allOf": [ |
| 10 | + { |
| 11 | + "type": "object", |
| 12 | + "required": [ |
| 13 | + "type", |
| 14 | + "properties", |
| 15 | + "assets" |
| 16 | + ], |
| 17 | + "properties": { |
| 18 | + "type": { |
| 19 | + "const": "Feature" |
| 20 | + }, |
| 21 | + "properties": { |
| 22 | + "allOf": [ |
| 23 | + { |
| 24 | + "$comment": "Require fields here for item properties.", |
| 25 | + "required": [ |
| 26 | + "storage:platform", |
| 27 | + "storage:region" |
| 28 | + ] |
| 29 | + }, |
| 30 | + { |
| 31 | + "$ref": "#/definitions/fields" |
| 32 | + } |
| 33 | + ] |
| 34 | + }, |
| 35 | + "assets": { |
| 36 | + "type": "object", |
| 37 | + "additionalProperties": { |
| 38 | + "$ref": "#/definitions/fields" |
| 39 | + } |
| 40 | + } |
| 41 | + } |
| 42 | + }, |
| 43 | + { |
| 44 | + "$ref": "#/definitions/stac_extensions" |
| 45 | + } |
| 46 | + ] |
| 47 | + }, |
| 48 | + { |
| 49 | + "$comment": "This is the schema for STAC Collections", |
| 50 | + "allOf": [ |
| 51 | + { |
| 52 | + "type": "object", |
| 53 | + "required": [ |
| 54 | + "type" |
| 55 | + ], |
| 56 | + "properties": { |
| 57 | + "type": { |
| 58 | + "const": "Collection" |
| 59 | + }, |
| 60 | + "assets": { |
| 61 | + "type": "object", |
| 62 | + "additionalProperties": { |
| 63 | + "$ref": "#/definitions/fields" |
| 64 | + } |
| 65 | + }, |
| 66 | + "item_assets": { |
| 67 | + "type": "object", |
| 68 | + "additionalProperties": { |
| 69 | + "$ref": "#/definitions/fields" |
| 70 | + } |
| 71 | + } |
| 72 | + } |
| 73 | + }, |
| 74 | + { |
| 75 | + "$ref": "#/definitions/stac_extensions" |
| 76 | + } |
| 77 | + ] |
| 78 | + } |
| 79 | + ], |
6 | 80 | "definitions": { |
7 | | - "storage": { |
| 81 | + "stac_extensions": { |
8 | 82 | "type": "object", |
9 | 83 | "required": [ |
10 | | - "stac_extensions", |
11 | | - "properties", |
12 | | - "assets" |
| 84 | + "stac_extensions" |
13 | 85 | ], |
14 | 86 | "properties": { |
15 | 87 | "stac_extensions": { |
16 | 88 | "type": "array", |
17 | 89 | "contains": { |
18 | 90 | "const": "https://stac-extensions.github.io/storage/v1.0.0/schema.json" |
19 | 91 | } |
20 | | - }, |
21 | | - "properties": { |
22 | | - "type": "object", |
23 | | - "required": [ |
24 | | - "storage:platform", |
25 | | - "storage:region" |
| 92 | + } |
| 93 | + } |
| 94 | + }, |
| 95 | + "fields": { |
| 96 | + "type": "object", |
| 97 | + "properties": { |
| 98 | + "storage:platform": { |
| 99 | + "title": "Platform", |
| 100 | + "type": "string", |
| 101 | + "enum": [ |
| 102 | + "OTHER", |
| 103 | + "AWS", |
| 104 | + "GCP", |
| 105 | + "AZURE", |
| 106 | + "IBM", |
| 107 | + "ALIBABA", |
| 108 | + "ORACLE" |
26 | 109 | ], |
27 | | - "properties": { |
28 | | - "storage:platform": { |
29 | | - "title": "Platform", |
30 | | - "type": "string", |
31 | | - "enum": [ |
32 | | - "UNKNOWN_CLOUD_PLATFORM", |
33 | | - "AWS", |
34 | | - "GCP", |
35 | | - "AZURE", |
36 | | - "IBM", |
37 | | - "ALIBABA", |
38 | | - "ORACLE" |
39 | | - ], |
40 | | - "default": "UNKNOWN_CLOUD_PLATFORM" |
41 | | - }, |
42 | | - "storage:manager": { |
43 | | - "title": "Manager", |
44 | | - "type": "string" |
45 | | - }, |
46 | | - "storage:region": { |
47 | | - "title": "Region", |
48 | | - "type": "string" |
49 | | - }, |
50 | | - "storage:bucket": { |
51 | | - "title": "Bucket", |
52 | | - "type": "string" |
53 | | - }, |
54 | | - "storage:object_path": { |
55 | | - "title": "Object Path", |
56 | | - "type": "string" |
57 | | - }, |
58 | | - "storage:requester_pays": { |
59 | | - "type": "boolean", |
60 | | - "title": "Requester pays", |
61 | | - "default": false |
62 | | - }, |
63 | | - "storage:tier": { |
64 | | - "title": "Tier", |
65 | | - "type": "string" |
66 | | - }, |
67 | | - "storage:tier_duration": { |
68 | | - "title": "Tier Duration", |
69 | | - "type": "integer", |
70 | | - "default": 0 |
71 | | - }, |
72 | | - "storage:first_byte_latency": { |
73 | | - "title": "Tier", |
74 | | - "type": "string" |
75 | | - }, |
76 | | - "storage:min_tier_duration": { |
77 | | - "title": "Minimum Duration for Tier", |
78 | | - "type": "integer", |
79 | | - "default": 0 |
80 | | - }, |
81 | | - "storage:max_tier_duration": { |
82 | | - "title": "Maxiumum Duration for Tier", |
83 | | - "type": "integer", |
84 | | - "default": 0 |
85 | | - }, |
86 | | - "storage:archived": { |
87 | | - "title": "Archived", |
88 | | - "type": "boolean", |
89 | | - "default": false |
90 | | - } |
91 | | - } |
| 110 | + "default": "OTHER" |
| 111 | + }, |
| 112 | + "storage:manager": { |
| 113 | + "title": "Manager", |
| 114 | + "type": "string" |
| 115 | + }, |
| 116 | + "storage:region": { |
| 117 | + "title": "Region", |
| 118 | + "type": "string" |
| 119 | + }, |
| 120 | + "storage:bucket": { |
| 121 | + "title": "Bucket", |
| 122 | + "type": "string" |
| 123 | + }, |
| 124 | + "storage:object_path": { |
| 125 | + "title": "Object Path", |
| 126 | + "type": "string" |
| 127 | + }, |
| 128 | + "storage:requester_pays": { |
| 129 | + "type": "boolean", |
| 130 | + "title": "Requester pays", |
| 131 | + "default": false |
| 132 | + }, |
| 133 | + "storage:tier": { |
| 134 | + "title": "Tier", |
| 135 | + "type": "string" |
| 136 | + }, |
| 137 | + "storage:tier_duration": { |
| 138 | + "title": "Tier Duration", |
| 139 | + "type": "integer", |
| 140 | + "default": 0 |
| 141 | + }, |
| 142 | + "storage:first_byte_latency": { |
| 143 | + "title": "Tier", |
| 144 | + "type": "string" |
| 145 | + }, |
| 146 | + "storage:min_tier_duration": { |
| 147 | + "title": "Minimum Duration for Tier", |
| 148 | + "type": "integer", |
| 149 | + "default": 0 |
| 150 | + }, |
| 151 | + "storage:max_tier_duration": { |
| 152 | + "title": "Maxiumum Duration for Tier", |
| 153 | + "type": "integer", |
| 154 | + "default": 0 |
| 155 | + }, |
| 156 | + "storage:archived": { |
| 157 | + "title": "Archived", |
| 158 | + "type": "boolean", |
| 159 | + "default": false |
92 | 160 | } |
93 | 161 | } |
94 | 162 | } |
|
0 commit comments