Skip to content

Commit

Permalink
Patch OpenAPI building blocks file and example. Update all instances of
Browse files Browse the repository at this point in the history
"catalogue" to "catalog".
  • Loading branch information
pvretano committed Dec 30, 2023
1 parent 8ed421f commit 430b3b6
Show file tree
Hide file tree
Showing 52 changed files with 1,718 additions and 640 deletions.
8 changes: 4 additions & 4 deletions core/examples/json/collection.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"id": "sentinel1cat",
"itemType": "record",
"title": "Sentinel-1 Catalogue",
"description": "A sample catalogue of Sentinel-1 products stored in S3 on AWS.",
"title": "Sentinel-1 Catalog",
"description": "A sample catalog of Sentinel-1 products stored in S3 on AWS.",
"links": [
{
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogues/collections/sentinel1cat/items",
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogs/collections/sentinel1cat/items",
"rel": "items",
"title": "Catalogue records describing SENTINEL-1 products."
"title": "Catalog records describing SENTINEL-1 products."
}
]
}
22 changes: 11 additions & 11 deletions core/examples/json/collections.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"links": [
{
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogues/collections?f=application%2Fjson",
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogs/collections?f=application%2Fjson",
"rel": "self",
"type": "application/json",
"title": "this document"
},
{
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogues/collections?f=text%2Fxml",
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogs/collections?f=text%2Fxml",
"rel": "alternate",
"type": "text/xml",
"title": "this document as XML"
},
{
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogues/collections?f=text%2Fhtml",
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogs/collections?f=text%2Fhtml",
"rel": "alternate",
"type": "text/html",
"title": "this document as HTML"
Expand All @@ -23,26 +23,26 @@
{
"id": "radarsat2cat",
"itemType": "record",
"title": "CubeWerx RADARSAT-2 Catalogue",
"description": "A sample catalogue of RADARSAT-2 products stored in S3 on AWS.",
"title": "CubeWerx RADARSAT-2 Catalog",
"description": "A sample catalog of RADARSAT-2 products stored in S3 on AWS.",
"links": [
{
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogues/collections/s1tepcat",
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogs/collections/s1tepcat",
"rel": "collection",
"title": "Root URL for this record collection. At this endpoint you can retrieve a description of this catalogue as well as hypermedia controls that allow you to query the catalogue."
"title": "Root URL for this record collection. At this endpoint you can retrieve a description of this catalog as well as hypermedia controls that allow you to query the catalog."
}
]
},
{
"id": "sentinel1cat",
"itemType": "record",
"title": "CubeWerx Sentinel-1 Catalogue",
"description": "A sample catalogue of Sentinel-1 products stored in S3 on AWS.",
"title": "CubeWerx Sentinel-1 Catalog",
"description": "A sample catalog of Sentinel-1 products stored in S3 on AWS.",
"links": [
{
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogues/collections/sentinel1cat",
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogs/collections/sentinel1cat",
"rel": "collection",
"title": "Root URL for this record collection. At this endpoint you can retrieve a description of this catalogue as well as hypermedia controls that allow you to query the catalogue."
"title": "Root URL for this record collection. At this endpoint you can retrieve a description of this catalog as well as hypermedia controls that allow you to query the catalog."
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: Need to add a crawlable catalog example for datasets (e.g. a set of SHAPE files or GeoPackages, etc.).

This file was deleted.

8 changes: 4 additions & 4 deletions core/examples/json/defaultSortOrder.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"id": "sentinel1cat",
"itemType": "record",
"title": "Sentinel-1 Catalogue",
"description": "A sample catalogue of Sentinel-1 products stored in S3 on AWS.",
"title": "Sentinel-1 Catalog",
"description": "A sample catalog of Sentinel-1 products stored in S3 on AWS.",
"defaultSortOrder": [ "-updated", "-area"],
"links": [
{
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogues/collections/sentinel1cat/items",
"href": "http://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/catalogs/collections/sentinel1cat/items",
"rel": "items",
"title": "Catalogue records describing SENTINEL-1 products."
"title": "Catalog records describing SENTINEL-1 products."
}
]
}
18 changes: 9 additions & 9 deletions core/examples/json/record-collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,56 +13,56 @@
],
"links": [
{
"href": "https://example.org/collections/myCatalogue?f=json...",
"href": "https://example.org/collections/myCatalog?f=json...",
"rel": "collection",
"type": "application/geo+json",
"title": "Link to the containing collection in JSON"
},
{
"href": "https://example.org/collections/myCatalogue?f=html...",
"href": "https://example.org/collections/myCatalog?f=html...",
"rel": "collection",
"type": "text/html",
"title": "Link to the containing collection in HTML"
},
{
"href": "https://example.org/collections/myCatalogue?f=xml...",
"href": "https://example.org/collections/myCatalog?f=xml...",
"rel": "collection",
"type": "text/xml",
"title": "Link to the containing collection in XML"
},

{
"href": "https://example.org/collections/myCatalogue/items?f=json&...",
"href": "https://example.org/collections/myCatalog/items?f=json&...",
"rel": "self",
"type": "application/geo+json",
"title": "Link to this response"
},
{
"href": "https://example.org/collections/myCatalogue/items?f=html&...",
"href": "https://example.org/collections/myCatalog/items?f=html&...",
"rel": "alternate",
"type": "text/html",
"title": "Link to this response in HTML"
},
{
"href": "https://example.org/collections/myCatalogue/items?f=atom&...",
"href": "https://example.org/collections/myCatalog/items?f=atom&...",
"rel": "alternate",
"type": "application/atom+xml",
"title": "Link to this response in ATOM (i.e. as an ATOM feed)"
},
{
"href": "https://example.org/collections/myCatalogue/items?f=json&startIndex=20&limit=10...",
"href": "https://example.org/collections/myCatalog/items?f=json&startIndex=20&limit=10...",
"rel": "next",
"type": "application/geo+json",
"title": "Link to the next set of records in GeoJSON"
},
{
"href": "https://example.org/collections/myCatalogue/items?f=html&startIndex=20&limit=10...",
"href": "https://example.org/collections/myCatalog/items?f=html&startIndex=20&limit=10...",
"rel": "next",
"type": "text/html",
"title": "Link to the next set of records in HTML"
},
{
"href": "https://example.org/collections/myCatalogue/items?f=atom&startIndex=20&limit=10...",
"href": "https://example.org/collections/myCatalog/items?f=atom&startIndex=20&limit=10...",
"rel": "next",
"type": "application/atom+xml",
"title": "Link to the next set of records in ATOM (i.e. as an ATOM feed)"
Expand Down
52 changes: 18 additions & 34 deletions core/examples/openapi/ogcapi-records-1-example1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ paths:
'/conformance':
get:
tags:
- Capabilities
- Conformance
summary: information about specifications that this API conforms to
description: |-
A list of all conformance classes specified in a standard that the
Expand All @@ -66,69 +66,53 @@ paths:
'/collections':
get:
tags:
- Capabilities
- Collections
summary: the record collections in the dataset
operationId: getCollections
responses:
'200':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/Collections'
'500':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/ServerError'
'/collections/{collectionId}':
'/collections/{catalogId}':
get:
tags:
- Capabilities
- Collection
summary: |-
describe the record collection with id `collectionId`
describe the record collection with id `catalogId`
operationId: describeCollection
parameters:
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/collectionId'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/catalogId'
responses:
'200':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/Collection'
'404':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/NotFound'
'500':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/ServerError'
'/collections/{collectionId}/api':
get:
tags:
- OpenSearchDescriptionDocument
summary: |-
get the OpenSearchDescriptionDocument for the record collection with id `collectionId`
operationId: getOpenSearchDescriptionDocument
parameters:
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/collectionId'
responses:
'200':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/OpenSearchDescriptionDocument'
'404':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/NotFound'
'500':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/ServerError'
'/collections/{collectionId}/sortables':
'/collections/{catalogId}/sortables':
get:
tags:
- Sortables
summary: |-
get the list of sortable properties
operationId: getSortables
parameters:
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/collectionId'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/catalogId'
responses:
'200':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/Sortables'
'404':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/NotFound'
'500':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/ServerError'
'/collections/{collectionId}/items':
'/collections/{catalogId}/items':
get:
tags:
- Data
- Records
summary: fetch records
description: |-
Fetch records of the record collection with id `collectionId`.
Fetch records of the record collection with id `catalogId`.
Every record in a dataset belongs to a collection. A dataset may
consist of multiple record collections. A record collection is often a
Expand All @@ -137,7 +121,7 @@ paths:
Use content negotiation to request HTML or GeoJSON.
operationId: getRecords
parameters:
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/collectionId'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/catalogId'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/bbox'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/datetime'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/limit'
Expand All @@ -154,23 +138,23 @@ paths:
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/NotFound'
'500':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/ServerError'
'/collections/{collectionId}/items/{recordId}':
'/collections/{catalogId}/items/{recordId}':
get:
tags:
- Data
- Record
summary: fetch a single record
description: |-
Fetch the record with id `recordId` in the record collection
with id `collectionId`.
with id `catalogId`.
Use content negotiation to request HTML or GeoJSON.
operationId: getFeature
operationId: getRecord
parameters:
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/collectionId'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/catalogId'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/parameters/recordId'
responses:
'200':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/Feature'
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/Record'
'404':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1.yaml#/components/responses/NotFound'
'500':
Expand Down
Loading

0 comments on commit 430b3b6

Please sign in to comment.