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

New field in links (method, headers, body) #1253

Merged
merged 19 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added

- The `keywords` field known from Collections is available in common metadata. ([#1187](https://github.com/radiantearth/stac-spec/issues/1187))
- New fields `method`, `headers` and `body` in the Link Object. ([#1198](https://github.com/radiantearth/stac-spec/issues/1198))
- The `license` field additionally supports SPDX expressions and the value `other`.
- The `roles` field known from Assets and Providers is available in common metadata. ([#1267](https://github.com/radiantearth/stac-spec/issues/1267))
- Best practice: Link titles should exactly reflect the title of the corresponding entity ([#1168](https://github.com/radiantearth/stac-spec/issues/1168))
Expand Down
13 changes: 1 addition & 12 deletions catalog-spec/catalog-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,7 @@ This must **not** declare the extensions that are only implemented in child Coll

### Link Object

This object describes a relationship with another entity. Data providers are advised to be liberal
with links.

| Field Name | Type | Description |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| href | string | **REQUIRED.** The actual link in the format of an URL. Relative and absolute links are both allowed. [Trailing slashes are significant.](../best-practices.md#consistent-uris) |
| rel | string | **REQUIRED.** Relationship between the current document and the linked document. See chapter ["Relation types"](#relation-types) for more information. |
| type | string | [Media type](#media-types) of the referenced entity. |
| title | string | A human readable title to be used in rendered displays of the link. |

For a full discussion of the situations where relative and absolute links are recommended see the
['Use of links'](../best-practices.md#use-of-links) section of the STAC best practices.
This object is described in the [STAC Common Metadata](../item-spec/common-metadata.md#link-object) section.

#### Relation types

Expand Down
12 changes: 1 addition & 11 deletions collection-spec/collection-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,7 @@ May also include information about the final storage provider hosting the data.

### Link Object

This object describes a relationship with another entity. Data providers are advised to be liberal with links.

| Field Name | Type | Description |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| href | string | **REQUIRED.** The actual link in the format of an URL. Relative and absolute links are both allowed. [Trailing slashes are significant.](../best-practices.md#consistent-uris) |
| rel | string | **REQUIRED.** Relationship between the current document and the linked document. See chapter "[Relation types](#relation-types)" for more information. |
| type | string | [Media type](../catalog-spec/catalog-spec.md#media-types) of the referenced entity. |
| title | string | A human readable title to be used in rendered displays of the link. |

For a full discussion of the situations where relative and absolute links are recommended see the
['Use of links'](../best-practices.md#use-of-links) section of the STAC best practices.
This object is described in the [STAC Common Metadata](../item-spec/common-metadata.md#link-object) section.

#### Relation types

Expand Down
21 changes: 21 additions & 0 deletions item-spec/common-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ or [Collection Asset](../collection-spec/collection-spec.md#asset-object).
- [constellation](#constellation)
- [mission](#mission)
- [gsd](#gsd)
- [Link](#link-object)

Various *examples* are available in the folder [`examples`](../examples/).
*JSON Schemas* can be found in the folder [`json-schema`](json-schema/).
Expand Down Expand Up @@ -212,3 +213,23 @@ optical and short-wave IR bands are all 30 meters, but the panchromatic band is
PlanetScope Ortho Tile Product has an `gsd` of 3.7 (or 4 if rounding), even though the pixel size of the images is 3.125.
For example, one might choose for WorldView-2 the Multispectral 20° off-nadir value of 2.07
and for WorldView-3 the Multispectral 20° off-nadir value of 1.38.

### Link Object

This object describes a relationship with another entity. Data providers are advised to be liberal
with the links section, to describe things like the Catalog an Item is in, related Items, parent or
child Items (modeled in different ways, like an 'acquisition' or derived data).
It is allowed to add additional fields such as a `title` and `type`.
emmanuelmathot marked this conversation as resolved.
Show resolved Hide resolved

| Field Name | Type | Description |
| ---------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| href | string | **REQUIRED.** The actual link in the format of an URL. Relative and absolute links are both allowed. [Trailing slashes are significant.](../best-practices.md#consistent-uris) |
| rel | string | **REQUIRED.** Relationship between the current document and the linked document. See chapter "Relation types" for more information. |
| type | string | [Media type](../catalog-spec/catalog-spec.md#media-types) of the referenced entity. |
m-mohr marked this conversation as resolved.
Show resolved Hide resolved
| title | string | A human readable title to be used in rendered displays of the link. |
| method | string | The HTTP method required to be supported by the target resource. `GET` by default |
| headers | Map<string, *> | The HTTP headers required to be sent by the target resource. |
m-mohr marked this conversation as resolved.
Show resolved Hide resolved
| body | object | The HTTP body required to be sent by the target resource. |
emmanuelmathot marked this conversation as resolved.
Show resolved Hide resolved

For a full discussion of the situations where relative and absolute links are recommended see the
['Use of links'](../best-practices.md#use-of-links) section of the STAC best practices.
emmanuelmathot marked this conversation as resolved.
Show resolved Hide resolved
15 changes: 1 addition & 14 deletions item-spec/item-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,7 @@ only be used when the data itself is nested, as with `eo:bands`.

### Link Object

This object describes a relationship with another entity. Data providers are advised to be liberal
with the links section, to describe things like the Catalog an Item is in, related Items, parent or
child Items (modeled in different ways, like an 'acquisition' or derived data).
It is allowed to add additional fields such as a `title` and `type`.

| Field Name | Type | Description |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| href | string | **REQUIRED.** The actual link in the format of an URL. Relative and absolute links are both allowed. [Trailing slashes are significant.](../best-practices.md#consistent-uris) |
| rel | string | **REQUIRED.** Relationship between the current document and the linked document. See chapter "Relation types" for more information. |
| type | string | [Media type](../catalog-spec/catalog-spec.md#media-types) of the referenced entity. |
| title | string | A human readable title to be used in rendered displays of the link. |

For a full discussion of the situations where relative and absolute links are recommended see the
['Use of links'](../best-practices.md#use-of-links) section of the STAC best practices.
This object is described in the [STAC Common Metadata](common-metadata.md#link-object) section.

#### Relation types

Expand Down
12 changes: 12 additions & 0 deletions item-spec/json-schema/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,18 @@
"title": {
"title": "Link title",
"type": "string"
},
"method": {
"title": "Link method",
"type": "string"
emmanuelmathot marked this conversation as resolved.
Show resolved Hide resolved
},
"headers": {
"title": "Link headers",
"type": "object"
m-mohr marked this conversation as resolved.
Show resolved Hide resolved
},
"body": {
"title": "Link body",
"type": "object"
emmanuelmathot marked this conversation as resolved.
Show resolved Hide resolved
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@
]
]
}
}
}