Skip to content

Commit

Permalink
Resolve issue #398.
Browse files Browse the repository at this point in the history
  • Loading branch information
pvretano committed Nov 5, 2024
1 parent 7c9fbce commit b7e4f21
Show file tree
Hide file tree
Showing 11 changed files with 717 additions and 396 deletions.
974 changes: 646 additions & 328 deletions core/openapi/ogcapi-records-1-building-blocks.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ paths:
operationId: getLandingPage
responses:
'200':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/LandingPage'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/LandingPage'
'500':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
'/conformance':
get:
tags:
Expand All @@ -75,9 +75,9 @@ paths:
operationId: getConformanceDeclaration
responses:
'200':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/ConformanceDeclaration'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ConformanceDeclaration'
'500':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
'/collections':
get:
tags:
Expand All @@ -88,9 +88,9 @@ paths:
operationId: getCollections
responses:
'200':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/Catalogs'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Catalogs'
'500':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
'/collections/{catalogId}':
get:
tags:
Expand All @@ -102,14 +102,14 @@ paths:
with id `catalogId`.
operationId: describeCollection
parameters:
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/parameters/catalogId'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/catalogId'
responses:
'200':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/Catalog'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Catalog'
'404':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/NotFound'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotFound'
'500':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
'/collections/{catalogId}/sortables':
get:
tags:
Expand All @@ -121,14 +121,14 @@ paths:
response.
operationId: getSortables
parameters:
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/parameters/catalogId'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/catalogId'
responses:
'200':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/Sortables'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Sortables'
'404':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/NotFound'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotFound'
'500':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
'/collections/{catalogId}/items':
get:
tags:
Expand All @@ -144,24 +144,24 @@ 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-building-blocks.yaml#/components/parameters/catalogId'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/parameters/bbox'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/parameters/datetime'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/parameters/limit'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/parameters/q'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/parameters/type'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/parameters/externalId'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/parameters/ids'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/parameters/sortby'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/catalogId'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/bbox'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/datetime'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/limit'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/q'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/type'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/externalId'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/ids'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/sortby'
responses:
'200':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/Records'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Records'
'400':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/InvalidParameter'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/InvalidParameter'
'404':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/NotFound'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotFound'
'500':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
'/collections/{catalogId}/items/{recordId}':
get:
tags:
Expand All @@ -174,12 +174,12 @@ paths:
Use content negotiation to request HTML or GeoJSON.
operationId: getRecord
parameters:
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/parameters/catalogId'
- $ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/parameters/recordId'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/catalogId'
- $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/recordId'
responses:
'200':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/Record'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Record'
'404':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/NotFound'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotFound'
'500':
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
4 changes: 2 additions & 2 deletions core/openapi/responses/Catalogs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ content:
collections:
type: array
items:
$ref: 'catalog.yaml'
$ref: '../schemas/catalog.yaml'
linkTemplates:
type: array
items:
$ref: 'linkTemplate.yaml'
$ref: '../schemas/linkTemplate.yaml'
text/html:
schema:
type: string
19 changes: 5 additions & 14 deletions core/openapi/schemas/catalog.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
---
allOf:
- $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/collection.yaml'
- $ref: 'recordCommonProperties.yaml'
- type: object
required:
- id
- type
- links
properties:
id:
description:
The identifier of the catalog.
type: string
itemType:
description:
If this catalog is a homogenous collection
Expand Down Expand Up @@ -41,16 +36,12 @@ allOf:
type: string
enum:
- Catalog
extent:
$ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/extent.yaml'
crs:
description:
The list of supported coordinate reference systems.
conformsTo:
type: array
description:
The extensions/conformance classes used in this record.
items:
type: string
default:
- http://www.opengis.net/def/crs/OGC/1.3/CRS84
recordsArrayName:
type: string
default:
Expand All @@ -65,7 +56,7 @@ allOf:
links:
type: array
items:
$ref: 'linkBase.yaml'
$ref: 'link.yaml'
linkTemplates:
type: array
items:
Expand Down
4 changes: 2 additions & 2 deletions core/openapi/schemas/contact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ properties:
Graphic identifying a contact. The link relation should be `icon`
and the media type should be an image media type.
allOf:
- $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/link.yaml'
- $ref: 'link.yaml'
- type: object
required:
- rel
Expand Down Expand Up @@ -106,7 +106,7 @@ properties:
description: On-line information about the contact.
items:
allOf:
- $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/link.yaml'
- $ref: 'link.yaml'
- type: object
required:
- type
Expand Down
11 changes: 11 additions & 0 deletions core/openapi/schemas/link.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
type: object
allOf:
- $ref: 'linkBase.yaml'
- type: object
required:
- href
properties:
href:
type: string
format: uri
12 changes: 4 additions & 8 deletions core/openapi/schemas/linkBase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,26 @@ properties:
rel:
type: string
description: The type or semantics of the relation.
examples:
- "alternate"
example: "alternate"
type:
type: string
description:
A hint indicating what the media type of the
result of dereferencing the link should be.
examples:
- "application/geo+json"
example: "application/geo+json"
hreflang:
type: string
description:
A hint indicating what the language of the
result of dereferencing the link should be.
examples:
- "en"
example: "en"
title:
type: string
description:
Used to label the destination of a link
such that it can be used as a human-readable
identifier.
examples:
- "Trierer Strasse 70, 53115 Bonn"
example: "Trierer Strasse 70, 53115 Bonn"
length:
type: integer
created:
Expand Down
3 changes: 1 addition & 2 deletions core/openapi/schemas/linkTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ allOf:
description:
Supplies a resolvable URI to a remote resource
(or resource fragment).
examples:
- "http://data.example.com/buildings/(building-id}"
example: "http://data.example.com/buildings/(building-id}"
varBase:
type: string
description:
Expand Down
6 changes: 0 additions & 6 deletions core/openapi/schemas/recordCommonProperties.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
---
type: object
properties:
conformsTo:
type: array
description:
The extensions/conformance classes used in this record.
items:
type: string
created:
type: string
description:
Expand Down
8 changes: 7 additions & 1 deletion core/openapi/schemas/recordGeoJSON.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ properties:
- enum:
- null
- $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometryGeoJSON.yaml'
conformsTo:
type: array
description:
The extensions/conformance classes used in this record.
items:
type: string
properties:
allOf:
- $ref: 'recordCommonProperties.yaml'
Expand All @@ -32,7 +38,7 @@ properties:
links:
type: array
items:
$ref: 'linkBase.yaml'
$ref: 'link.yaml'
linkTemplates:
type: array
items:
Expand Down
8 changes: 7 additions & 1 deletion core/openapi/schemas/recordJSON.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ allOf:
- enum:
- null
- $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometryGeoJSON.yaml'
conformsTo:
type: array
description:
The extensions/conformance classes used in this record.
items:
type: string
links:
description:
A list of static links associated with this record.
type: array
items:
$ref: 'linkBase.yaml'
$ref: 'link.yaml'
linkTemplates:
description:
A list of dynamic links associated with this record.
Expand Down

0 comments on commit b7e4f21

Please sign in to comment.