diff --git a/core/openapi/ogcapi-records-1-building-blocks.yaml b/core/openapi/ogcapi-records-1-building-blocks.yaml index 9eabd899..ca2b888d 100644 --- a/core/openapi/ogcapi-records-1-building-blocks.yaml +++ b/core/openapi/ogcapi-records-1-building-blocks.yaml @@ -684,9 +684,15 @@ components: enum: - Feature time: - $ref: '#/components/schemas/time' + oneOf: + - type: object + nullable: true + - $ref: '#/components/schemas/time' geometry: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometryGeoJSON.yaml' + oneOf: + - type: object + nullable: true + - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometryGeoJSON.yaml' conformsTo: type: array description: |- @@ -694,10 +700,12 @@ components: items: type: string properties: - nullable: true - allOf: + oneOf: - type: object - - $ref: '#/components/schemas/recordCommonProperties' + nullable: true + - allOf: + - type: object + - $ref: '#/components/schemas/recordCommonProperties' links: type: array items: @@ -778,7 +786,6 @@ components: enumerating the list of schemes in the queryable's schema definition. time: - nullable: true type: object properties: date: @@ -866,16 +873,6 @@ components: text/html: schema: type: string - InvalidParameter: - description: |- - A query parameter has an invalid value. - content: - application/json: - schema: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/exception.yaml' - text/html: - schema: - type: string LandingPage: description: |- The landing page provides links to the API definition (link relations diff --git a/core/openapi/ogcapi-records-1-example-all-in-one.yaml b/core/openapi/ogcapi-records-1-example-all-in-one.yaml index a334c817..a3957b2a 100644 --- a/core/openapi/ogcapi-records-1-example-all-in-one.yaml +++ b/core/openapi/ogcapi-records-1-example-all-in-one.yaml @@ -62,6 +62,9 @@ paths: The landing page provides links to the API definition, the conformance statements and to the record collections in this dataset. operationId: getLandingPage + parameters: + - $ref: '#/components/parameters/language' + - $ref: '#/components/parameters/profile' responses: '200': $ref: '#/components/responses/LandingPage' @@ -97,6 +100,17 @@ paths: description: |- Fetch list of catalogs offered by this API operationId: getCollections + parameters: + - $ref: '#/components/parameters/bbox' + - $ref: '#/components/parameters/datetime' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/q' + - $ref: '#/components/parameters/type' + - $ref: '#/components/parameters/externalIds' + - $ref: '#/components/parameters/ids' + - $ref: '#/components/parameters/sortby' + - $ref: '#/components/parameters/language' + - $ref: '#/components/parameters/profile' responses: '200': $ref: '#/components/responses/Catalogs' @@ -118,14 +132,8 @@ paths: operationId: describeCollection parameters: - $ref: '#/components/parameters/catalogId' - - $ref: '#/components/parameters/bbox' - - $ref: '#/components/parameters/datetime' - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/q' - - $ref: '#/components/parameters/type' - - $ref: '#/components/parameters/externalIds' - - $ref: '#/components/parameters/ids' - - $ref: '#/components/parameters/sortby' + - $ref: '#/components/parameters/language' + - $ref: '#/components/parameters/profile' responses: '200': $ref: '#/components/responses/Catalog' @@ -149,6 +157,8 @@ paths: operationId: getSortables parameters: - $ref: '#/components/parameters/catalogId' + - $ref: '#/components/parameters/language' + - $ref: '#/components/parameters/profile' responses: '200': $ref: '#/components/responses/Sortables' @@ -184,6 +194,8 @@ paths: - $ref: '#/components/parameters/externalIds' - $ref: '#/components/parameters/ids' - $ref: '#/components/parameters/sortby' + - $ref: '#/components/parameters/language' + - $ref: '#/components/parameters/profile' responses: '200': $ref: '#/components/responses/Records' @@ -209,6 +221,8 @@ paths: parameters: - $ref: '#/components/parameters/catalogId' - $ref: '#/components/parameters/recordId' + - $ref: '#/components/parameters/language' + - $ref: '#/components/parameters/profile' responses: '200': $ref: '#/components/responses/Record' @@ -223,7 +237,61 @@ paths: components: parameters: bbox: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/bbox.yaml' + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/bbox.yaml' + + Only features that have a geometry that intersects the bounding box are + selected. The bounding box is provided as four or six numbers, + depending on whether the coordinate reference system includes a + vertical axis (height or depth): + + * Lower left corner, coordinate axis 1 + * Lower left corner, coordinate axis 2 + * Minimum value, coordinate axis 3 (optional) + * Upper right corner, coordinate axis 1 + * Upper right corner, coordinate axis 2 + * Maximum value, coordinate axis 3 (optional) + + If the value consists of four numbers, the coordinate reference system + is WGS 84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/ + CRS84) unless a different coordinate reference system is specified in + the parameter `bbox-crs`. + + If the value consists of six numbers, the coordinate reference system + is WGS 84 longitude/latitude/ellipsoidal height (http://www.opengis. + net/def/crs/OGC/0/CRS84h) unless a different coordinate reference + system is specified in the parameter `bbox-crs`. + + The query parameter `bbox-crs` is specified in + OGC API - Features - Part 2: Coordinate Reference Systems by Reference. + + For WGS 84 longitude/latitude the values are in most cases the sequence + of minimum longitude, minimum latitude, maximum longitude and maximum + latitude. However, in cases where the box spans the antimeridian the + first value (west-most box edge) is larger than the third value + (east-most box edge). + + If the vertical axis is included, the third and the sixth number are the + bottom and the top of the 3-dimensional bounding box. + + If a feature has multiple spatial geometry properties, it is the + decision of the server whether only a single spatial geometry property + is used to determine the extent or all relevant geometries. + name: bbox + in: query + required: false + schema: + type: array + oneOf: + - minItems: 4 + maxItems: 4 + - minItems: 6 + maxItems: 6 + items: + type: number + style: form + explode: false catalogId: name: catalogId in: path @@ -232,7 +300,34 @@ components: schema: type: string datetime: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/datetime.yaml' + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/datetime.yaml + + Either a date-time or an interval. Date and time expressions adhere to + RFC 3339. Intervals may be bounded or half-bounded (double-dots at + start or end). + + Examples: + + * A date-time: "2018-02-12T23:20:50Z" + * A bounded interval: "2018-02-12T00:00:00Z/2018-03-18T12:31:12Z" + * Half-bounded intervals: "2018-02-12T00:00:00Z/.." or + "../2018-03-18T12:31:12Z" + + Only features that have a temporal property that intersects the value + of `datetime` are selected. + + If a feature has multiple temporal properties, it is the decision of the + server whether only a single temporal property is used to determine + the extent or all relevant temporal properties. + name: datetime + in: query + required: false + schema: + type: string + style: form + explode: false externalIds: name: externalIds in: query @@ -286,7 +381,29 @@ components: explode: false style: form limit: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/limit.yaml' + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/limit.yaml + + The optional limit parameter limits the number of items that are + presented in the response document. + + Only items are counted that are on the first level of the collection + in the response document. + Nested objects contained within the explicitly requested items shall + not be counted. + + Minimum = 1. Maximum = 10000. Default = 10. + name: limit + in: query + required: false + schema: + type: integer + minimum: 1 + maximum: 10000 + default: 10 + style: form + explode: false profile: name: profile in: query @@ -362,6 +479,492 @@ components: explode: false style: form schemas: + f-collections: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/collections.yaml + type: object + required: + - links + - collections + properties: + links: + type: array + items: + $ref: '#/components/schemas/link' + collections: + type: array + items: + $ref: '#/components/schemas/f-collection' + f-collection: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/collection.yaml + type: object + required: + - id + - links + properties: + id: + description: identifier of the collection used, for example, in URIs + type: string + example: address + title: + description: human readable title of the collection + type: string + example: address + description: + description: a description of the features in the collection + type: string + example: An address. + links: + type: array + items: + $ref: '#/components/schemas/link' + example: + - href: http://data.example.com/buildings + rel: item + - href: http://example.com/concepts/buildings.html + rel: describedby + type: text/html + extent: + $ref: '#/components/schemas/f-extent' + itemType: + description: |- + indicator about the type of the items in the collection (the + default value is 'feature'). + type: string + default: feature + crs: + description: |- + the list of coordinate reference systems supported by the service + type: array + items: + type: string + default: + - http://www.opengis.net/def/crs/OGC/1.3/CRS84 + example: + - http://www.opengis.net/def/crs/OGC/1.3/CRS84 + - http://www.opengis.net/def/crs/EPSG/0/4326 + f-extent: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/extent.yaml + + The extent of the features in the collection. In the Core only spatial + and temporal extents are specified. Extensions may add additional + members to represent other extents, for example, thermal or pressure + ranges. + + An array of extents is provided for each extent type (spatial, + temporal). The first item in the array describes the overall extent of + the data. All subsequent items describe more precise extents, e.g., to + identify clusters of data. Clients only interested in the overall + extent will only need to access the first extent in the array. + type: object + properties: + spatial: + description: |- + The spatial extent of the features in the collection. + type: object + properties: + bbox: + description: |- + One or more bounding boxes that describe the spatial extent + of the dataset. + In the Core only a single bounding box is supported. + + Extensions may support additional areas. + The first bounding box describes the overall spatial + extent of the data. All subsequent bounding boxes describe + more precise bounding boxes, e.g., to identify clusters of data. + Clients only interested in the overall spatial extent will + only need to access the first bounding box in the array. + type: array + minItems: 1 + items: + description: |- + Each bounding box is provided as four or six numbers, + depending on whether the coordinate reference system + includes a vertical axis (height or depth): + + * Lower left corner, coordinate axis 1 + * Lower left corner, coordinate axis 2 + * Minimum value, coordinate axis 3 (optional) + * Upper right corner, coordinate axis 1 + * Upper right corner, coordinate axis 2 + * Maximum value, coordinate axis 3 (optional) + + If the value consists of four numbers, the coordinate + reference system is WGS 84 longitude/latitude (http://www. + opengis.net/def/crs/OGC/1.3/CRS84) unless a different + coordinate reference system is specified in `crs`. + + If the value consists of six numbers, the coordinate + reference system is WGS 84 longitude/latitude/ellipsoidal + height (http://www.opengis.net/def/crs/OGC/0/CRS84h) + unless a different coordinate reference system is specified + in `crs`. + + For WGS 84 longitude/latitude the values are in most cases + the sequence of minimum longitude, minimum latitude, maximum + longitude and maximum latitude. However, in cases where the + box spans the antimeridian the first value (west-most box + edge) is larger than the third value (east-most box edge). + + If the vertical axis is included, the third and the sixth + number are the bottom and the top of the 3-dimensional + bounding box. + + If a feature has multiple spatial geometry properties, it is + the decision of the server whether only a single spatial + geometry property is used to determine the extent or all + relevant geometries. + type: array + oneOf: + - minItems: 4 + maxItems: 4 + - minItems: 6 + maxItems: 6 + items: + type: number + example: + - -180 + - -90 + - 180 + - 90 + crs: + description: |- + Coordinate reference system of the coordinates in the spatial + extent (property `bbox`). The default reference system is WGS + 84 longitude/latitude. In the Core the only other supported + coordinate reference system is WGS 84 longitude/latitude/ + ellipsoidal height for coordinates with height. + Extensions may support additional coordinate reference systems + and add additional enum values. + type: string + enum: + - 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' + - 'http://www.opengis.net/def/crs/OGC/0/CRS84h' + default: 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' + temporal: + description: |- + The temporal extent of the features in the collection. + type: object + properties: + interval: + description: |- + One or more time intervals that describe the temporal extent + of the dataset. In the Core only a single time interval is + supported. + + Extensions may support multiple intervals. + The first time interval describes the overall temporal extent + of the data. All subsequent time intervals describe more + precise time intervals, e.g., to identify clusters of data. + Clients only interested in the overall temporal extent will + only need to access the first time interval in the array (a + pair of lower and upper bound instants). + type: array + minItems: 1 + items: + description: |- + Begin and end times of the time interval. The timestamps are + in the temporal coordinate reference system specified in + `trs`. By default this is the Gregorian calendar. + + The value `null` at start or end is supported and indicates + a half-bounded interval. + type: array + minItems: 2 + maxItems: 2 + items: + type: string + format: date-time + nullable: true + example: + - '2011-11-11T12:22:11Z' + - null + trs: + description: |- + Coordinate reference system of the coordinates in the temporal + extent (property `interval`). The default reference system is + the Gregorian calendar. In the Core this is the only supported + temporal coordinate reference system. + Extensions may support additional temporal coordinate reference + systems and add additional enum values. + type: string + enum: + - 'http://www.opengis.net/def/uom/ISO-8601/0/Gregorian' + default: 'http://www.opengis.net/def/uom/ISO-8601/0/Gregorian' + featureCollectionGeoJSON: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/featureCollectionGeoJSON.yaml + type: object + required: + - type + - features + properties: + type: + type: string + enum: + - FeatureCollection + features: + type: array + items: + $ref: '#/components/schemas/featureGeoJSON' + links: + type: array + items: + $ref: '#/components/schemas/link' + timeStamp: + type: string + format: date-time + numberMatched: + type: integer + minimum: 0 + numberReturned: + type: integer + minimum: 0 + featureGeoJSON: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/featureGeoJSON.yaml + type: object + required: + - type + - geometry + - properties + properties: + type: + type: string + enum: + - Feature + geometry: + $ref: '#/components/schemas/geometryGeoJSON' + properties: + type: object + nullable: true + id: + oneOf: + - type: string + - type: integer + links: + type: array + items: + $ref: '#/components/schemas/link' + geometryGeoJSON: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometryGeoJSON.yaml + oneOf: + - $ref: '#/components/schemas/pointGeoJSON' + - $ref: '#/components/schemas/multipointGeoJSON' + - $ref: '#/components/schemas/linestringGeoJSON' + - $ref: '#/components/schemas/multilinestringGeoJSON' + - $ref: '#/components/schemas/polygonGeoJSON' + - $ref: '#/components/schemas/multipolygonGeoJSON' + - $ref: '#/components/schemas/geometrycollectionGeoJSON' + pointGeoJSON: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/pointGeoJSON.yaml + type: object + required: + - type + - coordinates + properties: + type: + type: string + enum: + - Point + coordinates: + type: array + minItems: 2 + items: + type: number + multipointGeoJSON: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/multipointGeoJSON.yaml + type: object + required: + - type + - coordinates + properties: + type: + type: string + enum: + - MultiPoint + coordinates: + type: array + items: + type: array + minItems: 2 + items: + type: number + linestringGeoJSON: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/linestringGeoJSON.yaml + type: object + required: + - type + - coordinates + properties: + type: + type: string + enum: + - LineString + coordinates: + type: array + minItems: 2 + items: + type: array + minItems: 2 + items: + type: number + multilinestringGeoJSON: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/multilinestringGeoJSON.yaml + type: object + required: + - type + - coordinates + properties: + type: + type: string + enum: + - MultiLineString + coordinates: + type: array + items: + type: array + minItems: 2 + items: + type: array + minItems: 2 + items: + type: number + polygonGeoJSON: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/polygonGeoJSON.yaml + type: object + required: + - type + - coordinates + properties: + type: + type: string + enum: + - Polygon + coordinates: + type: array + items: + type: array + minItems: 4 + items: + type: array + minItems: 2 + items: + type: number + multipolygonGeoJSON: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/multipolygonGeoJSON.yaml + type: object + required: + - type + - coordinates + properties: + type: + type: string + enum: + - MultiPolygon + coordinates: + type: array + items: + type: array + items: + type: array + minItems: 4 + items: + type: array + minItems: 2 + items: + type: number + geometrycollectionGeoJSON: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometrycollectionGeoJSON.yaml + type: object + required: + - type + - geometries + properties: + type: + type: string + enum: + - GeometryCollection + geometries: + type: array + items: + $ref: '#/components/schemas/geometryGeoJSON' + exception: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/exception.yaml + type: object + required: + - code + properties: + code: + type: string + description: + type: string + format: + type: object + anyOf: + - required: + - name + - required: + - mediaType + properties: + name: + type: string + mediaType: + type: string + f-landingPage: + description: |- + Imported from OGC API - Features - Part 1: Core + See: https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/landingPage.yaml + type: object + required: + - links + properties: + title: + type: string + example: Buildings in Bonn + description: + type: string + example: Access to data about buildings in the city of Bonn via a Web API that conforms to the OGC API Features specification. + links: + type: array + items: + $ref: '#/components/schemas/link' + confClasses: + type: object + required: + - conformsTo + properties: + conformsTo: + type: array + items: + type: string + example: "http://www.opengis.net/spec/ogcapi-records-1/1.0/conf/core" catalogCommonProperties: allOf: - $ref: '#/components/schemas/recordCommonProperties' @@ -426,7 +1029,7 @@ components: $ref: '#/components/schemas/scheme' catalogs: allOf: - - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/collections.yaml' + - $ref: '#/components/schemas/f-collections' - type: object properties: collections: @@ -439,7 +1042,7 @@ components: $ref: '#/components/schemas/linkTemplate' catalog: allOf: - - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/collection.yaml' + - $ref: '#/components/schemas/f-collection' - $ref: '#/components/schemas/catalogCommonProperties' - type: object properties: @@ -596,21 +1199,9 @@ components: enum: - asc - desc - format: - type: object - anyOf: - - required: - - name - - required: - - mediaType - properties: - name: - type: string - mediaType: - type: string landingPage: allOf: - - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/landingPage.yaml' + - $ref: '#/components/schemas/f-landingPage' - type: object properties: linkTemplates: @@ -757,7 +1348,7 @@ components: format: uri recordCollectionGeoJSON: allOf: - - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/featureCollectionGeoJSON.yaml' + - $ref: '#/components/schemas/featureCollectionGeoJSON' - type: object properties: features: @@ -890,9 +1481,15 @@ components: enum: - Feature time: - $ref: '#/components/schemas/time' + oneOf: + - type: object + nullable: true + - $ref: '#/components/schemas/time' geometry: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometryGeoJSON.yaml' + oneOf: + - type: object + nullable: true + - $ref: '#/components/schemas/geometryGeoJSON' conformsTo: type: array description: |- @@ -900,10 +1497,12 @@ components: items: type: string properties: - nullable: true - allOf: + oneOf: - type: object - - $ref: '#/components/schemas/recordCommonProperties' + nullable: true + - allOf: + - type: object + - $ref: '#/components/schemas/recordCommonProperties' links: type: array items: @@ -984,7 +1583,6 @@ components: enumerating the list of schemes in the queryable's schema definition. time: - nullable: true type: object properties: date: @@ -1020,7 +1618,7 @@ components: content: application/json: schema: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/exception.yaml' + $ref: '#/components/schemas/exception' text/html: schema: type: string @@ -1068,17 +1666,7 @@ components: content: application/json: schema: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/confClasses.yaml' - text/html: - schema: - type: string - InvalidParameter: - description: |- - A query parameter has an invalid value. - content: - application/json: - schema: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/exception.yaml' + $ref: '#/components/schemas/confClasses' text/html: schema: type: string @@ -1103,7 +1691,7 @@ components: content: application/json: schema: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/exception.yaml' + $ref: '#/components/schemas/exception' text/html: schema: type: string @@ -1114,7 +1702,7 @@ components: content: application/json: schema: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/exception.yaml' + $ref: '#/components/schemas/exception' text/html: schema: type: string @@ -1163,7 +1751,7 @@ components: content: application/json: schema: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/exception.yaml' + $ref: '#/components/schemas/exception' text/html: schema: type: string diff --git a/core/openapi/ogcapi-records-1-example-ref-buildingblocks-bundle.yaml b/core/openapi/ogcapi-records-1-example-ref-buildingblocks-bundle.yaml index 63d935b7..62a34e7d 100644 --- a/core/openapi/ogcapi-records-1-example-ref-buildingblocks-bundle.yaml +++ b/core/openapi/ogcapi-records-1-example-ref-buildingblocks-bundle.yaml @@ -62,6 +62,9 @@ paths: The landing page provides links to the API definition, the conformance statements and to the record collections in this dataset. operationId: getLandingPage + parameters: + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/language' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/profile' responses: '200': $ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/LandingPage' @@ -97,6 +100,17 @@ paths: description: |- Fetch list of catalogs offered by this API operationId: getCollections + parameters: + - $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/externalIds' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/ids' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/sortby' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/language' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/profile' responses: '200': $ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Catalogs' @@ -118,14 +132,8 @@ paths: operationId: describeCollection parameters: - $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/externalIds' - - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/ids' - - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/sortby' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/language' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/profile' responses: '200': $ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Catalog' @@ -149,6 +157,8 @@ paths: operationId: getSortables parameters: - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/catalogId' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/language' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/profile' responses: '200': $ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Sortables' @@ -184,6 +194,8 @@ paths: - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/externalIds' - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/ids' - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/sortby' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/language' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/profile' responses: '200': $ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Records' @@ -209,6 +221,8 @@ paths: parameters: - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/catalogId' - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/recordId' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/language' + - $ref: 'ogcapi-records-1-building-blocks.yaml#/components/parameters/profile' responses: '200': $ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Record' diff --git a/core/openapi/ogcapi-records-1-example-ref-schema-repo.yaml b/core/openapi/ogcapi-records-1-example-ref-schema-repo.yaml index ea05bcaa..12f9b9b7 100644 --- a/core/openapi/ogcapi-records-1-example-ref-schema-repo.yaml +++ b/core/openapi/ogcapi-records-1-example-ref-schema-repo.yaml @@ -62,6 +62,9 @@ paths: The landing page provides links to the API definition, the conformance statements and to the record collections in this dataset. operationId: getLandingPage + parameters: + - $ref: 'parameters/language.yaml' + - $ref: 'parameters/profile.yaml' responses: '200': $ref: 'responses/LandingPage.yaml' @@ -97,6 +100,17 @@ paths: description: |- Fetch list of catalogs offered by this API operationId: getCollections + parameters: + - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/bbox.yaml' + - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/datetime.yaml' + - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/limit.yaml' + - $ref: 'parameters/q.yaml' + - $ref: 'parameters/type.yaml' + - $ref: 'parameters/externalIds.yaml' + - $ref: 'parameters/ids.yaml' + - $ref: 'parameters/sortby.yaml' + - $ref: 'parameters/language.yaml' + - $ref: 'parameters/profile.yaml' responses: '200': $ref: 'responses/Catalogs.yaml' @@ -117,14 +131,8 @@ paths: operationId: describeCollection parameters: - $ref: 'parameters/catalogId.yaml' - - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/bbox.yaml' - - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/datetime.yaml' - - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/limit.yaml' - - $ref: 'parameters/q.yaml' - - $ref: 'parameters/type.yaml' - - $ref: 'parameters/externalIds.yaml' - - $ref: 'parameters/ids.yaml' - - $ref: 'parameters/sortby.yaml' + - $ref: 'parameters/language.yaml' + - $ref: 'parameters/profile.yaml' responses: '200': $ref: 'responses/Catalog.yaml' @@ -148,6 +156,8 @@ paths: operationId: getSortables parameters: - $ref: 'parameters/catalogId.yaml' + - $ref: 'parameters/language.yaml' + - $ref: 'parameters/profile.yaml' responses: '200': $ref: 'responses/Sortables.yaml' @@ -174,15 +184,17 @@ paths: Use content negotiation to request HTML or GeoJSON. operationId: getRecords parameters: + - $ref: 'parameters/catalogId.yaml' - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/bbox.yaml' - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/datetime.yaml' - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/parameters/limit.yaml' - - $ref: 'parameters/catalogId.yaml' - $ref: 'parameters/q.yaml' - $ref: 'parameters/type.yaml' - $ref: 'parameters/externalIds.yaml' - $ref: 'parameters/ids.yaml' - $ref: 'parameters/sortby.yaml' + - $ref: 'parameters/language.yaml' + - $ref: 'parameters/profile.yaml' responses: '200': $ref: 'responses/Records.yaml' @@ -208,6 +220,8 @@ paths: parameters: - $ref: 'parameters/catalogId.yaml' - $ref: 'parameters/recordId.yaml' + - $ref: 'parameters/language.yaml' + - $ref: 'parameters/profile.yaml' responses: '200': $ref: 'responses/Record.yaml' diff --git a/core/openapi/schemas/recordGeoJSON.yaml b/core/openapi/schemas/recordGeoJSON.yaml index b2b62c2b..e9e4fcb7 100644 --- a/core/openapi/schemas/recordGeoJSON.yaml +++ b/core/openapi/schemas/recordGeoJSON.yaml @@ -17,9 +17,15 @@ properties: enum: - Feature time: - $ref: 'time.yaml' + oneOf: + - type: object + nullable: true + - $ref: 'time.yaml' geometry: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometryGeoJSON.yaml' + oneOf: + - type: object + nullable: true + - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometryGeoJSON.yaml' conformsTo: type: array description: |- @@ -27,10 +33,12 @@ properties: items: type: string properties: - nullable: true - allOf: + oneOf: - type: object - - $ref: 'recordCommonProperties.yaml' + nullable: true + - allOf: + - type: object + - $ref: 'recordCommonProperties.yaml' links: type: array items: diff --git a/core/standard/abstract_tests/building-blocks/record-core/ATS_default-mediatype.adoc b/core/standard/abstract_tests/building-blocks/record-core/ATS_default-mediatype.adoc index a2a4b19e..0ad159df 100644 --- a/core/standard/abstract_tests/building-blocks/record-core/ATS_default-mediatype.adoc +++ b/core/standard/abstract_tests/building-blocks/record-core/ATS_default-mediatype.adoc @@ -24,7 +24,7 @@ test-method:: . Construct a path for a given catalog record. . Issue a HTTP GET request on that path. . Check if the <> is advertised for the catalog. -. If yes, then check that the media type for content is `application/geo+json; application=ogc-record`. +. If yes, then check that the media type for content is `application/geo+json` and the record content contains a link (href="http://www.opengis.net/def/profile/OGC/0/ogc-record", rel="profile") in the "links" section. . If no, then check that the media type for content is HTML. -- -==== \ No newline at end of file +==== diff --git a/core/standard/abstract_tests/building-blocks/records-api/ATS_record-response.adoc b/core/standard/abstract_tests/building-blocks/records-api/ATS_record-response.adoc index 3575a7da..8c927663 100644 --- a/core/standard/abstract_tests/building-blocks/records-api/ATS_record-response.adoc +++ b/core/standard/abstract_tests/building-blocks/records-api/ATS_record-response.adoc @@ -27,14 +27,15 @@ test-method:: + -- . Construct a path (`/collections/{catalogId}/items/{recordId}`) to retrieve records from a catalog. -. Issue an HTTP GET request on that path and negotiate a GeoJSON (accept: `application/geo+json application=ogc-record`) response. +. Issue an HTTP GET request on that path and negotiate a GeoJSON (accept: `application/geo+json`) response. . Check that the value of the returned HTTP status header is +200+. -. Validate that the value of the `Content-Type` HTTP header is `application/geo+json application=ogc-record`. +. Validate that the value of the `Content-Type` HTTP header is `application/geo+json`. . Validate the content of the response using the schema https://schemas.opengis.net/ogcapi/records/part1/1.0/openapi/schemas/recordGeoJSON.yaml[recordGeoJSON.yaml]. . Verify that all links in the `links` section include a `rel` parameter. . Check that the `links` section of the record contains the following links: * a link to this response document (relation: `self`), * a typed link to the response document in every other media type supported by the service (relation: `alternate`), and * a link to the catalog that contains this record (relation: `collection`). +* a profile link (href="http://www.opengis.net/def/profile/OGC/0/ogc-record", rel="profile") -- -==== \ No newline at end of file +==== diff --git a/core/standard/requirements/building-blocks/record-core/REQ_default-mediatype.adoc b/core/standard/requirements/building-blocks/record-core/REQ_default-mediatype.adoc index 1f81d6ec..79dce1b6 100644 --- a/core/standard/requirements/building-blocks/record-core/REQ_default-mediatype.adoc +++ b/core/standard/requirements/building-blocks/record-core/REQ_default-mediatype.adoc @@ -13,6 +13,6 @@ ==== [%metadata] identifier:: /req/record-core/default-mediatype -part:: If the <> is advertised, then the default media type for record content SHALL be GeoJSON (i.e., `application/geo+json; application=ogc-record`). +part:: If the <> is advertised, then the default media type for record content SHALL be GeoJSON (i.e., `application/geo+json`) and (as per <>) the record content SHALL include a link (href="http://www.opengis.net/def/profile/OGC/0/ogc-record", rel="profile") in the "links" section. part:: If the <> is not advertised, then the default media type for record content SHALL be HTML (i.e `text/html`). -==== \ No newline at end of file +====