Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: validate stac api response with openapi_schema_validator #333

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,620 changes: 1,620 additions & 0 deletions .github/workflows/data/nightlights-500m-daily-items copy.json

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions .github/workflows/data/nightlights-500m-daily-items.json

Large diffs are not rendered by default.

93 changes: 93 additions & 0 deletions .github/workflows/data/nightlights-500m-daily.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"id": "nightlights-500m-daily",
"type": "Collection",
"links": [
{
"rel": "items",
"type": "application/geo+json",
"href": "https://staging-stac.delta-backend.com/collections/nightlights-500m-daily/items"
},
{
"rel": "parent",
"type": "application/json",
"href": "https://staging-stac.delta-backend.com/"
},
{
"rel": "root",
"type": "application/json",
"href": "https://staging-stac.delta-backend.com/"
},
{
"rel": "self",
"type": "application/json",
"href": "https://staging-stac.delta-backend.com/collections/nightlights-500m-daily"
}
],
"title": "Black Marble 500m Nightlights Daily Dataset",
"extent": {
"spatial": {
"bbox": [
[
-130,
9.997916666666665,
150,
60
]
]
},
"temporal": {
"interval": [
[
"2020-01-01T00:00:00+00:00",
"2021-03-01T00:00:00+00:00"
]
]
}
},
"license": "MIT",
"providers": [
{
"url": "https://blackmarble.gsfc.nasa.gov/",
"name": "NASA Black Marble",
"roles": [
"producer",
"processor"
]
},
{
"url": "https://www.earthdata.nasa.gov/dashboard/",
"name": "NASA VEDA",
"roles": [
"host"
]
}
],
"summaries": {
"datetime": [
"2020-01-01T00:00:00Z",
"2021-03-01T00:00:00Z"
],
"cog_default": {
"max": 6539.10009765625,
"min": 0
}
},
"description": "Darker colors indicate fewer night lights and less activity. Lighter colors indicate more night lights and more activity. Check out the HD dataset to see a light-corrected version of this dataset.",
"item_assets": {
"cog_default": {
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"roles": [
"data",
"layer"
],
"title": "Default COG Layer",
"description": "Cloud optimized default layer to display on map"
}
},
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json"
],
"dashboard:is_periodic": true,
"dashboard:time_density": "day"
}
28 changes: 0 additions & 28 deletions .github/workflows/data/noaa-emergency-response.json

This file was deleted.

163 changes: 0 additions & 163 deletions .github/workflows/data/noaa-eri-nashville2020.json

This file was deleted.

129 changes: 129 additions & 0 deletions .github/workflows/tests/schemas/collection_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"type": "object",
"required": [
"stac_version",
"id",
"type",
"description",
"license",
"extent",
"links"
],
"properties": {
"stac_version": {
"type": "string"
},
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"description": {
"type": "string",
"description": "Detailed multi-line description to fully explain the catalog or collection.\n[CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation."
},
"keywords": {
"type": "array",
"description": "List of keywords describing the collection.",
"items": {
"type": "string"
}
},
"license": {
"type": "string"
},
"extent": {
"type": "object",
"required": [
"spatial",
"temporal"
],
"properties": {
"spatial": {
"type": "object",
"required": [
"bbox"
],
"properties": {
"bbox": {
"type": "array",
"minItems": 1,
"items": {
"type": "array",
"minItems": 4,
"maxItems": 6,
"items": {
"type": "number"
}
}
}
}
},
"temporal": {
"type": "object",
"required": [
"interval"
],
"properties": {
"interval": {
"type": "array",
"minItems": 1,
"items": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "string",
"format": "date-time",
"nullable": "true"
}
}
}
}
},
"links": {
"type": "array",
"items": {
"type": "object",
"required": [
"href",
"rel"
],
"properties": {
"href": {
"type": "string",
"format": "uri"
},
"rel": {
"type": "string"
}
}
}
}
}
},
"links": {
"type": "array",
"items": {
"type": "object",
"required": [
"href",
"rel"
],
"properties": {
"href": {
"type": "string",
"format": "uri"
},
"rel": {
"type": "string"
}
}
}
},
"title": {
"type": "string"
}
}
}
95 changes: 95 additions & 0 deletions .github/workflows/tests/schemas/feature_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"type": "object",
"required": [
"stac_version",
"id",
"type",
"geometry",
"bbox",
"links",
"properties",
"assets"
],
"properties": {
"stac_version": {
"type": "string"
},
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"geometry": {
"type": "object",
"properties": {
"type": {
"type": "string",
"coordinates": "array"
}
}
},
"bbox": {
"type": "array"
},
"links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rel": {
"type": "string"
},
"type": {
"type": "string"
},
"href": {
"type": "string"
}
}
}
},
"assets": {
"type": "object",
"additionalProperties": {
"required": [
"href"
],
"properties": {
"href": {
"type": "string",
"format": "url"
},
"description": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
},
"collection": {
"type": "string"
},
"properties": {
"type": "object",
"required": [
"datetime"
],
"properties": {
"datetime": {
"type": "string",
"format": "date-time",
"nullable": "true"
}
}
},
"stac_extensions": {
"type": "array"
}
}
}
Loading