Skip to content

Commit 0d61f36

Browse files
committed
improve STAC OpenAPI and service metadata
1 parent 2ef86b1 commit 0d61f36

File tree

4 files changed

+44
-8
lines changed

4 files changed

+44
-8
lines changed

CHANGES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@
1515
[Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest)
1616
------------------------------------------------------------------------------------------------------------------
1717

18-
[//]: # (list changes here, using '-' for each new entry, remove this when items are added)
18+
## Changes
19+
20+
- STAC API: Improve reported service links.
21+
22+
- Add `STAC_LICENSE_URL` to define the relevant license metadata location of the selected implementation.
23+
- Add `STAC_OPENAPI_SPEC_PATH` and `STAC_OPENAPI_DOCS_PATH` to define endpoints of OpenAPI specification.
24+
- Update the `/services/stac` response to provide more metadata links, including license details and better
25+
API metadata references. Notably, replace the *generic* STAC API Core OpenAPI definition by the
26+
implementation-specific definition self-served by the selected docker image to document API extensions.
1927

2028
[2.20.1](https://github.com/bird-house/birdhouse-deploy/tree/2.20.1) (2025-12-16)
2129
------------------------------------------------------------------------------------------------------------------

birdhouse/components/stac/default.env

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ export STAC_PGPASSWORD='${BIRDHOUSE_POSTGRES_PASSWORD}'
2020
export STAC_VERSION=6.0.0-crim-2.1.0
2121
export STAC_IMAGE='ghcr.io/crim-ca/stac-app:2.1.0'
2222
export STAC_IMAGE_URI='${STAC_IMAGE}'
23+
export STAC_LICENSE_URL='https://raw.githubusercontent.com/crim-ca/stac-app/refs/heads/main/LICENSE'
24+
export STAC_OPENAPI_SPEC_PATH='/api'
25+
export STAC_OPENAPI_DOCS_PATH='/api.html'
26+
2327
# database SQL schemas must be aligned with STAC_VERSION
2428
# there versions are not "equal", check compatibilities on https://github.com/stac-utils/stac-fastapi-pgstac
2529
export STAC_DB_VERSION=0.9.8
@@ -92,6 +96,9 @@ OPTIONAL_VARS="
9296
\$STAC_VERSION
9397
\$STAC_IMAGE
9498
\$STAC_IMAGE_URI
99+
\$STAC_LICENSE_URL
100+
\$STAC_OPENAPI_SPEC_PATH
101+
\$STAC_OPENAPI_DOCS_PATH
95102
\$STAC_DB_VERSION
96103
\$STAC_DB_TAGGED
97104
\$STAC_DB_DOCKER

birdhouse/components/stac/docker-compose-extra.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ services:
2121
- POSTGRES_HOST_WRITER=stac-db
2222
- POSTGRES_PORT=5432
2323
- ROUTER_PREFIX=/stac
24-
- OPENAPI_URL=/stac/api
25-
- DOCS_URL=/stac/api.html
24+
- OPENAPI_URL=/stac${STAC_OPENAPI_SPEC_PATH}
25+
- DOCS_URL=/stac${STAC_OPENAPI_DOCS_PATH}
2626
logging: *default-logging
2727
restart: always
2828
healthcheck:

birdhouse/components/stac/service-config.json.template

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,43 @@
1919
{
2020
"rel": "service-doc",
2121
"type": "text/html",
22-
"href": "https://github.com/radiantearth/stac-api-spec/tree/v1.0.0"
22+
"href": "${BIRDHOUSE_PROXY_SCHEME}://${BIRDHOUSE_FQDN_PUBLIC}/stac${STAC_OPENAPI_DOCS_PATH}"
2323
},
2424
{
2525
"rel": "service-desc",
26-
"type": "application/yaml",
27-
"href": "https://raw.githubusercontent.com/radiantearth/stac-api-spec/main/core/openapi.yaml"
26+
"type": "application/vnd.oai.openapi+json;version=3.0",
27+
"href": "${BIRDHOUSE_PROXY_SCHEME}://${BIRDHOUSE_FQDN_PUBLIC}/stac${STAC_OPENAPI_SPEC_PATH}"
2828
},
2929
{
30-
"rel": "alternate",
30+
"title": "OpenAPI specification",
31+
"rel": "openapi",
32+
"type": "application/vnd.oai.openapi+json;version=3.0",
33+
"href": "${BIRDHOUSE_PROXY_SCHEME}://${BIRDHOUSE_FQDN_PUBLIC}/stac${STAC_OPENAPI_SPEC_PATH}"
34+
},
35+
{
36+
"rel": "conformance",
37+
"type": "application/json",
38+
"href": "${BIRDHOUSE_PROXY_SCHEME}://${BIRDHOUSE_FQDN_PUBLIC}/stac/conformance"
39+
},
40+
{
41+
"rel": "describedby",
3142
"type": "text/html",
32-
"href": "${BIRDHOUSE_PROXY_SCHEME}://${BIRDHOUSE_FQDN_PUBLIC}/stac-browser/"
43+
"href": "https://github.com/radiantearth/stac-api-spec/tree/v1.0.0"
3344
},
3445
{
3546
"rel": "service-meta",
3647
"type": "application/vnd.oci.image.index.v1+json",
3748
"href": "${STAC_IMAGE_URI}"
49+
},
50+
{
51+
"rel": "alternate",
52+
"type": "text/html",
53+
"href": "${BIRDHOUSE_PROXY_SCHEME}://${BIRDHOUSE_FQDN_PUBLIC}/stac-browser/"
54+
},
55+
{
56+
"rel": "license",
57+
"type": "text/plain",
58+
"href": "${STAC_LICENSE_URL}"
3859
}
3960
]
4061
}

0 commit comments

Comments
 (0)