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

Following sentinel 1 schema #8

Merged
merged 4 commits into from
Jan 16, 2025
Merged
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
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
Loading