Skip to content

Commit 078e25e

Browse files
committed
Maybe the examples need to be sorted?
1 parent d272615 commit 078e25e

25 files changed

Lines changed: 1720 additions & 1718 deletions

‎tests/cassettes/test_examples/test_example_from_dict[path11].yaml‎

Lines changed: 155 additions & 116 deletions
Large diffs are not rendered by default.

‎tests/cassettes/test_examples/test_example_from_dict[path12].yaml‎

Lines changed: 51 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -134,58 +134,66 @@ interactions:
134134
Host:
135135
- stac-extensions.github.io
136136
method: GET
137-
uri: https://stac-extensions.github.io/sat/v1.0.0/schema.json
137+
uri: https://stac-extensions.github.io/projection/v2.0.0/schema.json
138138
response:
139139
body:
140140
string: "{\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"$id\":
141-
\"https://stac-extensions.github.io/sat/v1.0.0/schema.json\",\n \"title\":
142-
\"Satellite Extension\",\n \"description\": \"STAC Sat Extension to a STAC
143-
Item.\",\n \"oneOf\": [\n {\n \"$comment\": \"This is the schema
144-
for STAC Items.\",\n \"allOf\": [\n {\n \"type\": \"object\",\n
145-
\ \"required\": [\n \"type\",\n \"properties\",\n
146-
\ \"assets\"\n ],\n \"properties\": {\n \"type\":
147-
{\n \"const\": \"Feature\"\n },\n \"properties\":
148-
{\n \"allOf\": [\n {\n \"anyOf\":
149-
[\n {\n \"required\": [\n \"sat:platform_international_designator\"\n
150-
\ ]\n },\n {\n \"required\":
151-
[\n \"sat:orbit_state\"\n ]\n
152-
\ },\n {\n \"required\":
153-
[\n \"sat:absolute_orbit\"\n ]\n
154-
\ },\n {\n \"required\":
155-
[\n \"sat:relative_orbit\"\n ]\n
156-
\ },\n {\n \"required\":
157-
[\n \"sat:anx_datetime\"\n ]\n
158-
\ }\n ]\n },\n {\n
159-
\ \"$ref\": \"#/definitions/fields\"\n }\n
160-
\ ]\n },\n \"assets\": {\n \"type\":
161-
\"object\",\n \"additionalProperties\": {\n \"$ref\":
162-
\"#/definitions/fields\"\n }\n }\n }\n },\n
163-
\ {\n \"$ref\": \"#/definitions/stac_extensions\"\n }\n
164-
\ ]\n },\n {\n \"$comment\": \"This is the schema for STAC
165-
Collections.\",\n \"allOf\": [\n {\n \"type\": \"object\",\n
166-
\ \"required\": [\n \"type\"\n ],\n \"properties\":
167-
{\n \"type\": {\n \"const\": \"Collection\"\n },\n
168-
\ \"assets\": {\n \"type\": \"object\",\n \"additionalProperties\":
141+
\"https://stac-extensions.github.io/projection/v2.0.0/schema.json\",\n \"title\":
142+
\"Projection Extension\",\n \"description\": \"STAC Projection Extension
143+
for STAC Items.\",\n \"$comment\": \"This schema succeeds if the proj: fields
144+
are not used at all, please keep this in mind.\",\n \"oneOf\": [\n {\n
145+
\ \"$comment\": \"This is the schema for STAC Items.\",\n \"allOf\":
146+
[\n {\n \"$ref\": \"#/definitions/stac_extensions\"\n },\n
147+
\ {\n \"type\": \"object\",\n \"required\": [\n \"type\",\n
148+
\ \"properties\",\n \"assets\"\n ],\n \"properties\":
149+
{\n \"type\": {\n \"const\": \"Feature\"\n },\n
150+
\ \"properties\": {\n \"$ref\": \"#/definitions/fields\"\n
151+
\ },\n \"assets\": {\n \"type\": \"object\",\n
152+
\ \"additionalProperties\": {\n \"$ref\": \"#/definitions/fields\"\n
153+
\ }\n }\n }\n }\n ]\n },\n
154+
\ {\n \"$comment\": \"This is the schema for STAC Collections.\",\n
155+
\ \"allOf\": [\n {\n \"type\": \"object\",\n \"required\":
156+
[\n \"type\"\n ],\n \"properties\": {\n \"type\":
157+
{\n \"const\": \"Collection\"\n },\n \"assets\":
158+
{\n \"type\": \"object\",\n \"additionalProperties\":
169159
{\n \"$ref\": \"#/definitions/fields\"\n }\n },\n
170160
\ \"item_assets\": {\n \"type\": \"object\",\n \"additionalProperties\":
171161
{\n \"$ref\": \"#/definitions/fields\"\n }\n }\n
172-
\ }\n }\n ]\n }\n ],\n \"definitions\": {\n \"stac_extensions\":
162+
\ }\n },\n {\n \"$ref\": \"#/definitions/stac_extensions\"\n
163+
\ }\n ]\n }\n ],\n \"definitions\": {\n \"stac_extensions\":
173164
{\n \"type\": \"object\",\n \"required\": [\n \"stac_extensions\"\n
174165
\ ],\n \"properties\": {\n \"stac_extensions\": {\n \"type\":
175-
\"array\",\n \"contains\": {\n \"const\": \"https://stac-extensions.github.io/sat/v1.0.0/schema.json\"\n
166+
\"array\",\n \"contains\": {\n \"const\": \"https://stac-extensions.github.io/projection/v2.0.0/schema.json\"\n
176167
\ }\n }\n }\n },\n \"fields\": {\n \"type\":
177-
\"object\",\n \"properties\": {\n \"sat:platform_international_designator\":
178-
{\n \"type\": \"string\"\n },\n \"sat:orbit_state\":
179-
{\n \"title\": \"Orbit State\",\n \"type\": \"string\",\n
180-
\ \"enum\": [\n \"ascending\",\n \"descending\",\n
181-
\ \"geostationary\"\n ]\n },\n \"sat:absolute_orbit\":
182-
{\n \"type\": \"integer\",\n \"minimum\": 1\n },\n
183-
\ \"sat:relative_orbit\": {\n \"type\": \"integer\",\n \"minimum\":
184-
1\n },\n \"sat:anx_datetime\": {\n \"type\": \"string\",\n
185-
\ \"format\": \"date-time\"\n }\n },\n \"patternProperties\":
186-
{\n \"^(?!sat:)\": {\n \"$comment\": \"Do not allow unspecified
187-
fields prefixed with sat:\"\n }\n },\n \"additionalProperties\":
188-
false\n }\n }\n}"
168+
\"object\",\n \"properties\": {\n \"proj:code\":{\n \"title\":\"Projection
169+
code\",\n \"type\":[\n \"string\",\n \"null\"\n
170+
\ ]\n },\n \"proj:wkt2\":{\n \"title\":\"Coordinate
171+
Reference System in WKT2 format\",\n \"type\":[\n \"string\",\n
172+
\ \"null\"\n ]\n },\n \"proj:projjson\":
173+
{\n \"title\":\"Coordinate Reference System in PROJJSON format\",\n
174+
\ \"oneOf\": [\n {\n \"$ref\": \"https://proj.org/schemas/v0.7/projjson.schema.json\"\n
175+
\ },\n {\n \"type\": \"null\"\n }\n
176+
\ ]\n },\n \"proj:geometry\":{\n \"$ref\":
177+
\"https://geojson.org/schema/Geometry.json\"\n },\n \"proj:bbox\":{\n
178+
\ \"title\":\"Extent\",\n \"type\":\"array\",\n \"oneOf\":
179+
[\n {\n \"minItems\":4,\n \"maxItems\":4\n
180+
\ },\n {\n \"minItems\":6,\n \"maxItems\":6\n
181+
\ }\n ],\n \"items\":{\n \"type\":\"number\"\n
182+
\ }\n },\n \"proj:centroid\":{\n \"title\":\"Centroid\",\n
183+
\ \"type\":\"object\",\n \"required\": [\n \"lat\",\n
184+
\ \"lon\"\n ],\n \"properties\": {\n \"lat\":
185+
{\n \"type\": \"number\",\n \"minimum\": -90,\n
186+
\ \"maximum\": 90\n },\n \"lon\": {\n \"type\":
187+
\"number\",\n \"minimum\": -180,\n \"maximum\":
188+
180\n }\n }\n },\n \"proj:shape\":{\n \"title\":\"Shape\",\n
189+
\ \"type\":\"array\",\n \"minItems\":2,\n \"maxItems\":2,\n
190+
\ \"items\":{\n \"type\":\"integer\"\n }\n },\n
191+
\ \"proj:transform\":{\n \"title\":\"Transform\",\n \"type\":\"array\",\n
192+
\ \"oneOf\": [\n {\n \"minItems\":6,\n \"maxItems\":6\n
193+
\ },\n {\n \"minItems\":9,\n \"maxItems\":9\n
194+
\ }\n ],\n \"items\":{\n \"type\":\"number\"\n
195+
\ }\n }\n },\n \"patternProperties\": {\n \"^(?!proj:)\":
196+
{}\n },\n \"additionalProperties\": false\n }\n }\n}"
189197
headers: {}
190198
status:
191199
code: 200
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
Connection:
6+
- close
7+
Host:
8+
- stac-extensions.github.io
9+
method: GET
10+
uri: https://stac-extensions.github.io/view/v1.0.0/schema.json
11+
response:
12+
body:
13+
string: "{\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"$id\":
14+
\"https://stac-extensions.github.io/view/v1.0.0/schema.json#\",\n \"title\":
15+
\"View Geometry Extension\",\n \"description\": \"STAC View Geometry Extension
16+
for STAC Items and STAC Collections.\",\n \"oneOf\": [\n {\n \"$comment\":
17+
\"This is the schema for STAC Items.\",\n \"allOf\": [\n {\n \"type\":
18+
\"object\",\n \"required\": [\n \"type\",\n \"properties\",\n
19+
\ \"assets\"\n ],\n \"properties\": {\n \"type\":
20+
{\n \"const\": \"Feature\"\n },\n \"properties\":
21+
{\n \"allOf\": [\n {\n \"anyOf\":
22+
[\n {\"required\": [\"view:off_nadir\"]},\n {\"required\":
23+
[\"view:incidence_angle\"]},\n {\"required\": [\"view:azimuth\"]},\n
24+
\ {\"required\": [\"view:sun_azimuth\"]},\n {\"required\":
25+
[\"view:sun_elevation\"]}\n ]\n },\n {\n
26+
\ \"$ref\": \"#/definitions/fields\"\n }\n
27+
\ ]\n },\n \"assets\": {\n \"type\":
28+
\"object\",\n \"additionalProperties\": {\n \"$ref\":
29+
\"#/definitions/fields\"\n }\n }\n }\n },\n
30+
\ {\n \"$ref\": \"#/definitions/stac_extensions\"\n }\n
31+
\ ]\n },\n {\n \"$comment\": \"This is the schema for STAC
32+
Collections.\",\n \"allOf\": [\n {\n \"type\": \"object\",\n
33+
\ \"required\": [\n \"type\"\n ],\n \"properties\":
34+
{\n \"type\": {\n \"const\": \"Collection\"\n },\n
35+
\ \"assets\": {\n \"type\": \"object\",\n \"additionalProperties\":
36+
{\n \"$ref\": \"#/definitions/fields\"\n }\n },\n
37+
\ \"item_assets\": {\n \"type\": \"object\",\n \"additionalProperties\":
38+
{\n \"$ref\": \"#/definitions/fields\"\n }\n }\n
39+
\ }\n },\n {\n \"$ref\": \"#/definitions/stac_extensions\"\n
40+
\ }\n ]\n }\n ],\n \"definitions\": {\n \"stac_extensions\":
41+
{\n \"type\": \"object\",\n \"required\": [\n \"stac_extensions\"\n
42+
\ ],\n \"properties\": {\n \"stac_extensions\": {\n \"type\":
43+
\"array\",\n \"contains\": {\n \"contains\": {\n \"const\":
44+
\"https://stac-extensions.github.io/view/v1.0.0/schema.json\"\n }\n
45+
\ }\n }\n }\n },\n \"fields\": {\n \"$comment\":
46+
\"Add your new fields here. Don't require them here, do that above in the
47+
item schema.\",\n \"type\": \"object\",\n \"properties\": {\n \"view:off_nadir\":
48+
{\n \"title\": \"Off Nadir\",\n \"type\": \"number\",\n
49+
\ \"minimum\": 0,\n \"maximum\": 90\n },\n \"view:incidence_angle\":
50+
{\n \"title\": \"Center incidence angle\",\n \"type\": \"number\",\n
51+
\ \"minimum\": 0,\n \"maximum\": 90\n },\n \"view:azimuth\":
52+
{\n \"title\": \"Azimuth angle\",\n \"type\": \"number\",\n
53+
\ \"minimum\": 0,\n \"maximum\": 360\n },\n \"view:sun_azimuth\":
54+
{\n \"title\": \"Sun Azimuth\",\n \"type\": \"number\",\n
55+
\ \"minimum\": 0,\n \"maximum\": 360\n },\n \"view:sun_elevation\":
56+
{\n \"title\": \"Sun Elevation\",\n \"type\": \"number\",\n
57+
\ \"minimum\": -90,\n \"maximum\": 90\n }\n },\n
58+
\ \"patternProperties\": {\n \"^(?!view:)\": {}\n },\n \"additionalProperties\":
59+
false\n }\n }\n}"
60+
headers: {}
61+
status:
62+
code: 200
63+
message: OK
64+
version: 1

0 commit comments

Comments
 (0)