Skip to content

Commit

Permalink
fix: modified the json-schema for linz properties to copy stac (#45)
Browse files Browse the repository at this point in the history
* fix: modified the json-schema for linz properties to copy stac

* fix: use description from schema

* fix: add linz prefix to new dates

* fix:update readme
  • Loading branch information
MitchellPaff authored Sep 22, 2021
1 parent 34151f0 commit 49677de
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 31 deletions.
12 changes: 6 additions & 6 deletions extensions/linz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ extension which adds constraints to default STAC schema properties.

## Item Properties and Collection Fields

| Field Name | Type | Description |
| ----------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| title | string | **REQUIRED**. Collection title. |
| security_classification | string | **REQUIRED**. New Zealand Government [Security Classification](https://www.digital.govt.nz/standards-and-guidance/governance/managing-online-channels/security-and-privacy-for-websites/foundations/classify-information/). Must be one of `Unclassified`, `IN-CONFIDENCE`, `SENSITIVE`, `RESTRICTED`, `CONFIDENTIAL`, `SECRET` or `TOP-SECRET`. |
| created | string | **REQUIRED**. Created Datetime. |
| updated | string | **REQUIRED**. Last updated Datetime. |
| Field Name | Type | Description |
| ---------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| title | string | **REQUIRED**. Collection title. |
| linz:security_classification | string | **REQUIRED**. New Zealand Government [Security Classification](https://www.digital.govt.nz/standards-and-guidance/governance/managing-online-channels/security-and-privacy-for-websites/foundations/classify-information/). Must be one of `Unclassified`, `IN-CONFIDENCE`, `SENSITIVE`, `RESTRICTED`, `CONFIDENTIAL`, `SECRET` or `TOP-SECRET`. |
| linz:created | string | **REQUIRED**. Creation date and time of the collection in UTC. |
| linz:updated | string | **REQUIRED**. Date and time the collection was updated last, in UTC. |

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions extensions/linz/examples/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"title": "A title",
"description": "A description",
"license": "Apache-2.0",
"created": "2015-06-23T00:00:00Z",
"updated": "2015-06-23T00:00:00Z",
"linz:created": "2015-06-23T00:00:00Z",
"linz:updated": "2015-06-23T00:00:00Z",
"linz:security_classification": "Unclassified",
"extent": {
"spatial": {
Expand Down
42 changes: 19 additions & 23 deletions extensions/linz/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,7 @@
"$ref": "https://schemas.stacspec.org/v1.0.0/collection-spec/json-schema/collection.json#"
},
{
"type": "object",
"required": ["title", "created", "updated"],
"properties": {
"title": {
"type": "string",
"minLength": 1
},
"created": {
"type": "string",
"minLength": 1,
"format": "date-time"
},
"updated": {
"type": "string",
"minLength": 1,
"format": "date-time"
}
}
},
{
"$ref": "#/definitions/security_classification"
"$ref": "#/definitions/linz"
},
{
"$ref": "#/definitions/stac_extensions"
Expand All @@ -47,13 +27,29 @@
}
}
},
"security_classification": {
"linz": {
"type": "object",
"required": ["linz:security_classification"],
"required": ["title", "linz:security_classification", "linz:created", "linz:updated"],
"properties": {
"title": {
"type": "string",
"minLength": 1
},
"linz:security_classification": {
"type": "string",
"enum": ["Unclassified", "IN-CONFIDENCE", "SENSITIVE", "RESTRICTED", "CONFIDENTIAL", "SECRET", "TOP-SECRET"]
},
"linz:created": {
"title": "Creation Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"linz:updated": {
"title": "Last Update Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
}
},
"patternProperties": {
Expand Down

0 comments on commit 49677de

Please sign in to comment.