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

upgrade to v1.1, support for OpenAPI 3.1 and RFC 9457 #948

Merged
merged 4 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions core/examples/json/ConformsTo.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"conformsTo": [
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core",
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30",
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html",
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/gmlsf0"
"http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/core",
"http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/oas31",
"http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/html",
"http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/geojson"
"http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/gmlsf0"
]
}
2 changes: 1 addition & 1 deletion core/examples/openapi/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenAPI definition examples

This folder includes two complete examples of an OpenAPI definition for a Web API implementing OGC API Features (the Core, HTML, GeoJSON and OpenAPI 3.0 conformance classes).
This folder includes two complete examples of an OpenAPI definition for a Web API implementing OGC API Features (the Core, HTML, GeoJSON and OpenAPI 3.1 conformance classes).

The [first example (ogcapi-features-1-example1.yaml)](ogcapi-features-1-example1.yaml) is a generic example that uses path parameters to describe all feature collections and all features. This OpenAPI definition does not provide any details on the collections or the feature content. This information is only available from the feature collection metadata. The API is also on [SwaggerHub](https://app.swaggerhub.com/apis/cportele/ogcapi-features-1-example1/1.0.0).

Expand Down
4 changes: 2 additions & 2 deletions core/examples/openapi/ogcapi-features-1-example1.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
openapi: 3.0.2
openapi: 3.1.0
info:
title: "A sample API conforming to the draft standard OGC API - Features - Part 1: Core"
version: '1.0.0'
description: |-
This is a sample OpenAPI definition that conforms to the conformance
classes "Core", "GeoJSON", "HTML" and "OpenAPI 3.0" of the draft
classes "Core", "GeoJSON", "HTML" and "OpenAPI 3.1" of the draft
standard "OGC API - Features - Part 1: Core".

This example is a generic OGC API Features definition that uses path
Expand Down
53 changes: 27 additions & 26 deletions core/examples/openapi/ogcapi-features-1-example2.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
openapi: 3.0.2
openapi: 3.1.0
info:
title: "A sample API conforming to the draft standard OGC API - Features - Part 1: Core"
version: '1.0.0'
description: |-
This is a sample OpenAPI definition that conforms to the conformance
classes "Core", "GeoJSON", "HTML" and "OpenAPI 3.0" of the draft
classes "Core", "GeoJSON", "HTML" and "OpenAPI 3.1" of the draft
standard "OGC API - Features - Part 1: Core".

This example differs from the [other example](ogcapi-features-1-example1.yaml)
Expand Down Expand Up @@ -127,15 +127,15 @@ paths:
example:
type: FeatureCollection
links:
- href: 'http://data.example.com/collections/buildings/items.json'
- href: 'https://data.example.com/collections/buildings/items.json'
rel: self
type: application/geo+json
title: this document
- href: 'http://data.example.com/collections/buildings/items.html'
- href: 'https://data.example.com/collections/buildings/items.html'
rel: alternate
type: text/html
title: this document as HTML
- href: 'http://data.example.com/collections/buildings/items.json&offset=10&limit=2'
- href: 'https://data.example.com/collections/buildings/items.json&offset=10&limit=2'
rel: next
type: application/geo+json
title: next page
Expand Down Expand Up @@ -193,18 +193,18 @@ paths:
example:
type: Feature
links:
- href: 'http://data.example.com/id/building/123'
- href: 'https://data.example.com/id/building/123'
rel: canonical
title: canonical URI of the building
- href: 'http://data.example.com/collections/buildings/items/123.json'
- href: 'https://data.example.com/collections/buildings/items/123.json'
rel: self
type: application/geo+json
title: this document
- href: 'http://data.example.com/collections/buildings/items/123.html'
- href: 'https://data.example.com/collections/buildings/items/123.html'
rel: alternate
type: text/html
title: this document as HTML
- href: 'http://data.example.com/collections/buildings'
- href: 'https://data.example.com/collections/buildings'
rel: collection
type: application/geo+json
title: the collection document
Expand Down Expand Up @@ -282,23 +282,24 @@ components:
geometry:
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-features/master/core/openapi/ogcapi-features-1.yaml#/components/schemas/geometryGeoJSON'
properties:
type: object
nullable: true
properties:
name:
type: string
function:
type: string
enum:
- residential
- commercial
- public use
floors:
type: integer
minimum: 1
lastUpdate:
type: string
format: date-time
oneOf:
- type: null
- type: object
properties:
name:
type: string
function:
type: string
enum:
- residential
- commercial
- public use
floors:
type: integer
minimum: 1
lastUpdate:
type: string
format: date-time
id:
oneOf:
- type: string
Expand Down
10 changes: 5 additions & 5 deletions core/examples/xml/ConformsTo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogcapi-features-1/1.0
../../xml/core.xsd">
<atom:link href="http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core"/>
<atom:link href="http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30"/>
<atom:link href="http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html"/>
<atom:link href="http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"/>
<atom:link href="http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/gmlsf0"/>
<atom:link href="http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/core"/>
<atom:link href="http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/oas31"/>
<atom:link href="http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/html"/>
<atom:link href="http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/geojson"/>
<atom:link href="http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/gmlsf0"/>
</ConformsTo>
54 changes: 29 additions & 25 deletions core/openapi/ogcapi-features-1.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
openapi: 3.0.2
openapi: 3.1.0
info:
title: "Building Blocks specified in OGC API - Features - Part 1: Core"
description: |-
Common components used in the
[OGC standard "OGC API - Features - Part 1: Core"](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html).
[OGC standard "OGC API - Features - Part 1: Core"](https://docs.ogc.org/is/17-069r5/17-069r5.html).

OGC API - Features - Part 1: Core 1.0 is an OGC Standard.
Copyright (c) 2019 Open Geospatial Consortium.
To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .
Copyright (c) 2024 Open Geospatial Consortium.
To obtain additional rights of use, visit https://www.ogc.org/legal/ .

This document is also available on
[OGC](http://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml).
[OGC](https://schemas.opengis.net/ogcapi/features/part1/1.1/openapi/ogcapi-features-1.yaml).
version: '1.0.0'
contact:
name: Clemens Portele
email: [email protected]
license:
name: OGC License
url: 'http://www.opengeospatial.org/legal/'
url: 'https://www.ogc.org/legal/'
components:
parameters:
bbox:
Expand Down Expand Up @@ -149,7 +149,7 @@ components:
items:
$ref: "#/components/schemas/link"
example:
- href: http://data.example.com/buildings
- href: https://data.example.com/buildings
rel: item
- href: http://example.com/concepts/buildings.html
rel: describedby
Expand Down Expand Up @@ -303,9 +303,10 @@ components:
minItems: 2
maxItems: 2
items:
type: string
format: date-time
nullable: true
oneOf:
- type: string
format: date-time
- type: null
example:
- '2011-11-11T12:22:11Z'
- null
Expand Down Expand Up @@ -356,10 +357,13 @@ components:
enum:
- Feature
geometry:
$ref: "#/components/schemas/geometryGeoJSON"
oneOf:
- type: null
- $ref: "#/components/schemas/geometryGeoJSON"
properties:
type: object
nullable: true
type:
- object
- null
id:
oneOf:
- type: string
Expand Down Expand Up @@ -432,7 +436,7 @@ components:
properties:
href:
type: string
example: http://data.example.com/buildings/123
example: https://data.example.com/buildings/123
rel:
type: string
example: alternate
Expand Down Expand Up @@ -638,10 +642,10 @@ components:
$ref: '#/components/schemas/confClasses'
example:
conformsTo:
- 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core'
- 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30'
- 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html'
- 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson'
- 'http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/core'
- 'http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/oas31'
- 'http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/html'
- 'http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/geojson'
text/html:
schema:
type: string
Expand Down Expand Up @@ -801,15 +805,15 @@ components:
example:
type: FeatureCollection
links:
- href: 'http://data.example.com/collections/buildings/items.json'
- href: 'https://data.example.com/collections/buildings/items.json'
rel: self
type: application/geo+json
title: this document
- href: 'http://data.example.com/collections/buildings/items.html'
- href: 'https://data.example.com/collections/buildings/items.html'
rel: alternate
type: text/html
title: this document as HTML
- href: 'http://data.example.com/collections/buildings/items.json&offset=10&limit=2'
- href: 'https://data.example.com/collections/buildings/items.json&offset=10&limit=2'
rel: next
type: application/geo+json
title: next page
Expand Down Expand Up @@ -851,18 +855,18 @@ components:
example:
type: Feature
links:
- href: 'http://data.example.com/id/building/123'
- href: 'https://data.example.com/id/building/123'
rel: canonical
title: canonical URI of the building
- href: 'http://data.example.com/collections/buildings/items/123.json'
- href: 'https://data.example.com/collections/buildings/items/123.json'
rel: self
type: application/geo+json
title: this document
- href: 'http://data.example.com/collections/buildings/items/123.html'
- href: 'https://data.example.com/collections/buildings/items/123.html'
rel: alternate
type: text/html
title: this document as HTML
- href: 'http://data.example.com/collections/buildings'
- href: 'https://data.example.com/collections/buildings'
rel: collection
type: application/geo+json
title: the collection document
Expand Down
2 changes: 1 addition & 1 deletion core/openapi/schemas/collection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ properties:
items:
$ref: link.yaml
example:
- href: http://data.example.com/buildings
- href: https://data.example.com/buildings
rel: item
- href: http://example.com/concepts/buildings.html
rel: describedby
Expand Down
2 changes: 1 addition & 1 deletion core/openapi/schemas/confClasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ properties:
type: array
items:
type: string
example: "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core"
example: "http://www.opengis.net/spec/ogcapi-features-1/1.1/conf/core"
23 changes: 19 additions & 4 deletions core/openapi/schemas/exception.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
type: object
required:
- code
title: An RFC 9457 problem object
properties:
code:
type:
type: string
description:
format: uri-reference
description: A URI reference that identifies the problem type.
title:
type: string
description: A short, human-readable summary of the problem type.
status:
type: integer
description: The HTTP status code generated by the origin server for this occurrence
of the problem.
minimum: 100
maximum: 599
detail:
type: string
description: A human-readable explanation specific to this occurrence of the problem.
instance:
type: string
format: uri-reference
description: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
7 changes: 4 additions & 3 deletions core/openapi/schemas/extent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ properties:
minItems: 2
maxItems: 2
items:
type: string
format: date-time
nullable: true
oneOf:
- type: string
format: date-time
- type: null
example:
- '2011-11-11T12:22:11Z'
- null
Expand Down
10 changes: 5 additions & 5 deletions core/openapi/schemas/featureGeoJSON.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ properties:
- Feature
geometry:
oneOf:
- enum:
- null
- $ref: geometryGeoJSON.yaml
- type: null
- $ref: geometryGeoJSON.yaml
properties:
type: object
nullable: true
type:
- object
- null
id:
oneOf:
- type: string
Expand Down
2 changes: 1 addition & 1 deletion core/openapi/schemas/link.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ allOf:
href:
type: string
description: The URI of the link target.
example: http://data.example.com/buildings/123
example: https://data.example.com/buildings/123
2 changes: 1 addition & 1 deletion core/openapi/schemas/linkTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ allOf:
description:
Supplies a URI template that when expanded using
a set of variables, results in a URI.
example: http://data.example.com/buildings/{building-id}
example: https://data.example.com/buildings/{building-id}
varBase:
type: string
description:
Expand Down
10 changes: 5 additions & 5 deletions core/standard/17-069.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
|Submission Date: <yyyy-mm-dd>
|Approval Date: <yyyy-mm-dd>
|Publication Date: <yyyy-mm-dd>
|External identifier of this OGC(R) document: http://www.opengis.net/doc/IS/ogcapi-features-1/1.0
|External identifier of this OGC(R) document: http://www.opengis.net/doc/IS/ogcapi-features-1/1.1
|Internal reference number of this OGC(R) document: 17-069r5
|Version: link:http://docs.opengeospatial.org/DRAFTS/17-069r5.html[1.0.2-SNAPSHOT (Editor's draft)]
|Latest Published Version: link:http://docs.opengeospatial.org/is/17-069r4/17-069r4.html[1.0.1]
|Version: link:https://docs.OGC.org/DRAFTS/17-069r5.html[1.1.0-SNAPSHOT (Editor's draft)]
|Latest Published Version: link:https://docs.ogc.org/is/17-069r4/17-069r4.html[1.0.1]
|Category: OGC(R) Implementation Standard
|Editors: Clemens Portele, Panagiotis (Peter) A. Vretanos, Charles Heazel
|===
Expand All @@ -45,8 +45,8 @@
[cols = "^", frame = "none", grid = "none"]
|===
|*Copyright notice*
|Copyright (C) 2022 Open Geospatial Consortium
|To obtain additional rights of use, visit http://www.opengeospatial.org/legal/
|Copyright (C) 2024 Open Geospatial Consortium
|To obtain additional rights of use, visit https://www.ogc.org/legal/
|===

[cols = "^", frame = "none"]
Expand Down
Loading