-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openapi: Updated with example definition from building blocks
- Loading branch information
1 parent
faca4aa
commit 177cfd3
Showing
48 changed files
with
2,113 additions
and
3,018 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# OpenAPI definitions | ||
|
||
This example API definition can be used to provide an OpenAPI 3.0 definition for an implementation of _OGC API - Common - Part 2: Geospatial Data_. | ||
The API definition can be visualized with [SwaggerUI](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/opengeospatial/ogcapi-common/master/collections/openapi/ogcapi-common-2.bundled.json). | ||
|
||
The lists of collections and tile matrix sets in the `/api` sub-directory should be tailored to the implementation and deployment, or those `/api/*` paths can be implemented dynamically by the server instead. | ||
|
||
The list of supported paths should be adjusted in `ogcapi-common-2.yaml`. | ||
|
||
# Building the OpenAPI bundle | ||
|
||
The `ogcapi-common-2.bundled.json` file is a standalone/portable OpenAPI document which includes all dependencies included from the components sub-directories. To build the bundle locally: | ||
|
||
```bash | ||
# install Swagger CLI via npm | ||
npm install -g @apidevtools/swagger-cli | ||
|
||
# generate OpenAPI bundle | ||
cd standard/openapi | ||
swagger-cli bundle -o ogcapi-common-2.bundled.json ogcapi-common-2.yaml | ||
``` | ||
|
||
See also [Swagger CLI](https://apitools.dev/swagger-cli/) and its [GitHub repository](https://github.com/APIDevTools/swagger-cli). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
These stand-in API resources are intended to dynamically enumerate specific types of implementation/deployment-dependent available resources in responses to `/api/*`. | ||
|
||
Alternatively, those resources could be directly enumerated in `schemas/dynamic/*` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"type" : "string", | ||
"enum" : [ | ||
"blueMarble", | ||
"NaturalEarth:raster:HYP_HR_SR_OB_DR", | ||
"NaturalEarth:cultural:ne_10m_admin_0_countries", | ||
"NaturalEarth:physical:bathymetry", | ||
"SRTM_ViewFinderPanorama", | ||
"HRDEM-Ottawa", | ||
"HRDEM-RedRiver" | ||
] | ||
} |
Oops, something went wrong.