Skip to content

Commit

Permalink
Merge pull request #8 from stac-extensions/schema_update
Browse files Browse the repository at this point in the history
Following sentinel 1 schema
  • Loading branch information
rhysrevans3 authored Jan 16, 2025
2 parents 938cf39 + 4ebc734 commit bdcaa98
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Inject env variables
uses: rlespinasse/github-slug-action@v4.4.1
uses: rlespinasse/github-slug-action@v4
- uses: actions/checkout@v4
- name: deploy JSON Schema for version ${{ env.GITHUB_REF_SLUG }}
uses: peaceiris/actions-gh-pages@v3.9.3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: json-schema
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ prefixed with `cmip6`.
The fields in the table below can be used in these parts of STAC documents:

- [ ] Catalogs
- [ ] Collections
- [x] Collections
- [x] Item Properties (incl. Summaries in Collections)
- [ ] Assets (for both Collections and Items, incl. Item Asset Definitions in Collections)
- [ ] Links
Expand Down
77 changes: 42 additions & 35 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,61 @@
"$id": "https://stac-extensions.github.io/cmip6/v1.0.0/schema.json#",
"title": "CMIP6 Extension",
"description": "STAC CMIP6 Extension for STAC Items and STAC Collection Summaries.",
"type": "object",
"required": [
"stac_extensions"
],
"properties": {
"stac_extensions": {
"type": "array",
"contains": {
"const": "https://stac-extensions.github.io/cmip6/v1.0.0/schema.json"
}
}
},
"oneOf": [
{
"$comment": "This is the schema for STAC Items.",
"allOf": [
{
"$ref": "#/definitions/stac_extensions"
"type": "object",
"required": [
"type",
"properties"
],
"properties": {
"type": {
"const": "Feature"
},
{
"type": "object",
"required": [
"type",
"properties"
],
"properties": {
"type": {
"const": "Feature"
"properties": {
"allOf": [
{
"$ref": "#/definitions/require_any"
},
"properties": {
"allOf": [
{
"$ref": "#/definitions/require_any_field"
},
{
"$ref": "#/definitions/fields"
}
]
{
"$ref": "#/definitions/fields"
}
}
]
}
]
}
],
"definitions": {
"stac_extensions": {
}
},
{
"$comment": "This is the schema for STAC Collections, or more specifically only Collection Summaries in this case. By default, only checks the existence of the properties, but not the schema of the summaries.",
"type": "object",
"required": [
"stac_extensions"
"type",
"summaries"
],
"properties": {
"stac_extensions": {
"type": "array",
"contains": {
"const": "https://stac-extensions.github.io/cmip6/v1.0.0/schema.json"
}
"type": {
"const": "Collection"
},
"summaries": {
"$ref": "#/definitions/require_any"
}
}
},
"require_any_field": {
}
],
"definitions": {
"require_any": {
"$comment": "Please list all fields here so that we can force the existence of one of them in other parts of the schemas.",
"anyOf": [
{
Expand Down

0 comments on commit bdcaa98

Please sign in to comment.