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

Issue 178 - Move 'created' and 'updated' fields from the record to the links pointing to the representation of the record. #179

Merged
merged 9 commits into from
Jan 12, 2023
14 changes: 8 additions & 6 deletions core/examples/json/record.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
]
},
"properties": {
"recordCreated": "2021-02-08",
"recordUpdated": "2021-02-08",
"created": "2021-02-08",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the values for created and updated in the examples are invalid, I think.
The spec says they are "datetime"s, but the examples are "date"s only. So I think it should be something like "2021-02-08T00:00:00Z"

"updated": "2021-02-08",
"type": "dataset",
"title": "Total Ozone - daily observations",
"description": "A measurement of the total amount of atmospheric ozone in a given column from the surface to the edge of the atmosphere. Ground based instruments such as spectrophotometers and ozonemeters are used to measure results daily",
Expand All @@ -53,8 +53,6 @@
"value": "urn:x-wmo:md:int.wmo.wis::https://geo.woudc.org/def/data/ozone/total-column-ozone/totalozone"
}
],
"created": "2015-01-23",
"updated": "2015-01-23",
"publisher": "https://woudc.org",
"themes": [
{
Expand Down Expand Up @@ -163,7 +161,9 @@
"rel": "enclosure",
"type": "text/html",
"title": "Web Accessible Folder (WAF)",
"href": "https://woudc.org/archive/Archive-NewFormat/TotalOzone_1.0_1"
"href": "https://woudc.org/archive/Archive-NewFormat/TotalOzone_1.0_1",
"created": "2015-01-23",
"updated": "2015-01-23"
},
{
"rel": "search",
Expand All @@ -175,7 +175,9 @@
"rel": "enclosure",
"type": "application/zip",
"title": "Static dataset archive file",
"href": "https://woudc.org/archive/Summaries/dataset-snapshots/totalozone.zip"
"href": "https://woudc.org/archive/Summaries/dataset-snapshots/totalozone.zip",
"created": "2015-01-23",
"updated": "2015-01-23"
},
{
"rel": "service",
Expand Down
22 changes: 12 additions & 10 deletions core/openapi/ogcapi-records-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,11 @@ components:
- type
- title
properties:
recordCreated:
created:
type: string
description: Date of creation of this record.
format: date-time
recordUpdated:
updated:
type: string
description: The most recent date on which the record was changed.
format: date-time
Expand Down Expand Up @@ -474,14 +474,6 @@ components:
description: The value of the identifier.
required:
- value
created:
type: string
description: Date of creation of the resource.
format: date-time
updated:
type: string
description: Most recent date on which the resource was changed.
format: date-time
publisher:
type: string
description: |-
Expand Down Expand Up @@ -621,6 +613,16 @@ components:
type: string
length:
type: integer
templated:
type: boolean
variables:
type: object
created:
type: string
format: date-time
updated:
type: string
format: date-time
multilinestringGeoJSON:
type: object
required:
Expand Down
10 changes: 10 additions & 0 deletions core/openapi/schemas/common/link.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ properties:
In combination with a templated href, the variables section should
provide enough information to bind to the target resource (e.g. a WMS).
type: object
created:
type: string
description:
Date of creation of the resource pointed to by the link.
format: date-time
updated:
type: string
description:
Most recent date on which the resource pointed to by the link was changed.
format: date-time
14 changes: 2 additions & 12 deletions core/openapi/schemas/recordGeoJSON.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ properties:
- type
- title
properties:
recordCreated:
created:
type: string
description:
Date of creation of this record.
format: date-time
recordUpdated:
updated:
type: string
description:
The most recent date on which the record was changed.
Expand Down Expand Up @@ -103,16 +103,6 @@ properties:
description: The value of the identifier.
required:
- value
created:
type: string
description:
Date of creation of the resource.
format: date-time
updated:
type: string
description:
Most recent date on which the resource was changed.
format: date-time
themes:
type: array
description:
Expand Down
12 changes: 7 additions & 5 deletions core/standard/clause_7_record.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Other encoding are allow but are not described in this document.
|===
|Queryables |Requirement |Description |GeoJSON key
|recordId |**required** |A unique record identifier assigned by the server. |id
|recordCreated |optional |The date this record was created in the server. |properties.recordCreated
|recordUpdated |optional |The most recent date on which the record was changed. |properties.recordUpdated
|created |optional |The date this record was created in the server. |properties.created
|updated |optional |The most recent date on which the record was changed. |properties.updated
|===

[#core-queryables-resource-table,reftext='{table-caption} {counter:table-num}']
Expand All @@ -55,8 +55,6 @@ Other encoding are allow but are not described in this document.
|keywords |optional |A list of free-form keywords or tags associated with the resource. |properties.keyword
|language |optional |The natural language used for textual values (i.e. titles, descriptions, etc) of a resource. |properties.language
|externalIds |optional |One or more identifiers for the resource assigned by an external entity. |properties.externalIds
|created |optional |The date the resource was created. |properties.created
|updated |optional |The more recent date on which the resource was changed. |properties.updated
|themes |optional |A knowledge organization system used to classify the resource. |properties.themes
|formats |optional |A list of available distributions for the resource. |properties.formats
|providers |optional |A list of providers qualified by their role in association to the record. |properties.providers
Expand Down Expand Up @@ -165,7 +163,7 @@ Templated links may also be used to bind to resources that may require additiona

This specification extends the https://github.com/opengeospatial/ogcapi-common/blob/master/core/openapi/schemas/link.json[schema for a link] to include substitution variables who values are filled in at runtime prior to resolving the link.

The https://github.com/opengeospatial/ogcapi-common/blob/master/core/openapi/schemas/link.json[link schema] is extended with the addition of two properties names `templated` and `variables`. The `templated` property is a boolean that is used to indicate the the URL of the link (i.e. `href`) is a template and contains substitution variables. The `variables` property uses https://json-schema.org/draft/2020-12/json-schema-validation.html[JSON-Schema fragments] to define the characteristics of each substitution variable referenced in the templated link URL.
The https://github.com/opengeospatial/ogcapi-common/blob/master/core/openapi/schemas/link.json[link schema] is extended with the addition of two properties named `templated` and `variables`. The `templated` property is a boolean that is used to indicate the the URL of the link (i.e. `href`) is a template and contains substitution variables. The `variables` property uses https://json-schema.org/draft/2020-12/json-schema-validation.html[JSON-Schema fragments] to define the characteristics of each substitution variable referenced in the templated link URL.

include::requirements/record-core/REQ_templated-link.adoc[]

Expand All @@ -176,6 +174,10 @@ include::requirements/record-core/REQ_templated-link.adoc[]
include::../examples/json/templated-link.json[]
----

==== Resource timestamps

A <<fix.me,record>> contains information for accessing the resource described by the record which is encoded in the links section. Since a resource may have multiple representations there may be multiple links pointing to each represention of a resource. Furthermore, representations of a resource may be created and updated at different times. In order to capture this life cycle information of resource representations, the https://github.com/opengeospatial/ogcapi-common/blob/master/core/openapi/schemas/link.json[link schema] is extended with the addition of two properties named `created` and `updated`. The values of these properties are used to indicate the creation and last updated dates of the resource representation pointed to by the link.

[[sc_language_negotiation]]
==== Language negotiation

Expand Down