{
  "openapi": "3.0.1",
  "info": {
    "title": "A sample API conforming to the OGC Web Feature Service standard",
    "description": "This is a sample OpenAPI definition that conforms to the OGC Web Feature Service specification (conformance classes: \"Core\", \"GeoJSON\", \"HTML\" and \"OpenAPI 3.0\").",
    "contact": {
      "name": "Acme Corporation",
      "url": "http://example.org/",
      "email": "info@example.org"
    },
    "license": {
      "name": "CC-BY 4.0 license",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    },
    "version": "M1"
  },
  "servers": [
    {
      "url": "https://dev.example.org/",
      "description": "Development server"
    },
    {
      "url": "https://data.example.org/",
      "description": "Production server"
    }
  ],
  "tags": [
    {
      "name": "Capabilities",
      "description": "Essential characteristics of this API including information about the data."
    },
    {
      "name": "Features",
      "description": "Access to data (features)."
    }
  ],
  "paths": {
    "/": {
      "get": {
        "tags": [
          "Capabilities"
        ],
        "summary": "landing page of this API",
        "description": "The landing page provides links to the API definition, the Conformance statements and the metadata about the feature data in this dataset.",
        "operationId": "getLandingPage",
        "responses": {
          "200": {
            "description": "links to the API capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/root"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/conformance": {
      "get": {
        "tags": [
          "Capabilities"
        ],
        "summary": "information about standards that this API conforms to",
        "description": "list all requirements classes specified in a standard (e.g., WFS 3.0 Part 1: Core) that the server conforms to",
        "operationId": "getRequirementsClasses",
        "responses": {
          "200": {
            "description": "the URIs of all requirements classes supported by the server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/req-classes"
                }
              }
            }
          },
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/exception"
                }
              }
            }
          }
        }
      }
    },
    "/collections": {
      "get": {
        "tags": [
          "Capabilities"
        ],
        "summary": "describe the feature collections in the dataset",
        "operationId": "describeCollections",
        "responses": {
          "200": {
            "description": "Metadata about the feature collections shared by this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/content"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/exception"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/collections/{collectionId}": {
      "get": {
        "tags": [
          "Capabilities"
        ],
        "summary": "describe the {collectionId} feature collection",
        "operationId": "describeCollection",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "description": "Identifier (name) of a specific collection",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata about the {collectionId} collection shared by this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/collectionInfo"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/exception"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/collections/{collectionId}/items": {
      "get": {
        "tags": [
          "Features"
        ],
        "summary": "retrieve features of feature collection {collectionId}",
        "description": "Every feature in a dataset belongs to a collection. A dataset may consist of multiple feature collections. A feature collection is often a collection of features of a similar type, based on a common schema.\\\nUse content negotiation to request HTML or GeoJSON.",
        "operationId": "getFeatures",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "description": "Identifier (name) of a specific collection",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The optional limit parameter limits the number of items that are\npresented in the response document.\n\nOnly items are counted that are on the first level of the collection in\nthe response document. Nested objects contained within the explicitly\nrequested items shall not be counted.\n\n* Minimum = 1\n* Maximum = 10000\n* Default = 10\n",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "maximum": 10000,
              "minimum": 1,
              "type": "integer",
              "default": 10
            }
          },
          {
            "name": "bbox",
            "in": "query",
            "description": "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 (elevation or depth):\n* Lower left corner, coordinate axis 1 * Lower left corner, coordinate axis 2 * Lower left corner, coordinate axis 3 (optional) * Upper right corner, coordinate axis 1 * Upper right corner, coordinate axis 2 * Upper right corner, coordinate axis 3 (optional)\nThe coordinate reference system of the values is WGS84 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`.\nFor WGS84 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).\nIf 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.\n",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "maxItems": 6,
              "minItems": 4,
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          },
          {
            "name": "time",
            "in": "query",
            "description": "Either a date-time or a period string that adheres to RFC 3339. Examples:\n* A date-time: \"2018-02-12T23:20:50Z\" * A period: \"2018-02-12T00:00:00Z/2018-03-18T12:31:12Z\" or \"2018-02-12T00:00:00Z/P1M6DT12H31M12S\"\nOnly features that have a temporal property that intersects the value of `time` are selected.\nIf 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.",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Information about the feature collection plus the first features matching the selection parameters.",
            "content": {
              "application/geo+json": {
                "schema": {
                  "$ref": "#/components/schemas/featureCollectionGeoJSON"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/exception"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/collections/{collectionId}/items/{featureId}": {
      "get": {
        "tags": [
          "Features"
        ],
        "summary": "retrieve a feature; use content negotiation to request HTML or GeoJSON",
        "operationId": "getFeature",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "description": "Identifier (name) of a specific collection",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureId",
            "in": "path",
            "description": "Local identifier of a specific feature",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A feature.",
            "content": {
              "application/geo+json": {
                "schema": {
                  "$ref": "#/components/schemas/featureGeoJSON"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/exception"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "exception": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "root": {
        "required": [
          "links"
        ],
        "type": "object",
        "properties": {
          "links": {
            "type": "array",
            "example": [
              {
                "href": "http://data.example.org/",
                "rel": "self",
                "type": "application/json",
                "title": "this document"
              },
              {
                "href": "http://data.example.org/api",
                "rel": "service",
                "type": "application/openapi+json;version=3.0",
                "title": "the API definition"
              },
              {
                "href": "http://data.example.org/conformance",
                "rel": "conformance",
                "type": "application/json",
                "title": "WFS 3.0 conformance classes implemented by this server"
              },
              {
                "href": "http://data.example.org/collections",
                "rel": "data",
                "type": "application/json",
                "title": "Metadata about the feature collections"
              }
            ],
            "items": {
              "$ref": "#/components/schemas/link"
            }
          }
        }
      },
      "req-classes": {
        "required": [
          "conformsTo"
        ],
        "type": "object",
        "properties": {
          "conformsTo": {
            "type": "array",
            "example": [
              "http://www.opengis.net/spec/wfs-1/3.0/req/core",
              "http://www.opengis.net/spec/wfs-1/3.0/req/oas30",
              "http://www.opengis.net/spec/wfs-1/3.0/req/html",
              "http://www.opengis.net/spec/wfs-1/3.0/req/geojson"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "link": {
        "required": [
          "href"
        ],
        "type": "object",
        "properties": {
          "href": {
            "type": "string"
          },
          "rel": {
            "type": "string",
            "example": "prev"
          },
          "type": {
            "type": "string",
            "example": "application/geo+json"
          },
          "hreflang": {
            "type": "string",
            "example": "en"
          }
        }
      },
      "content": {
        "required": [
          "collections",
          "links"
        ],
        "type": "object",
        "properties": {
          "links": {
            "type": "array",
            "example": [
              {
                "href": "http://data.example.org/collections.json",
                "rel": "self",
                "type": "application/json",
                "title": "this document"
              },
              {
                "href": "http://data.example.org/collections.html",
                "rel": "alternate",
                "type": "text/html",
                "title": "this document as HTML"
              },
              {
                "href": "http://schemas.example.org/1.0/foobar.xsd",
                "rel": "describedBy",
                "type": "application/xml",
                "title": "XML schema for Acme Corporation data"
              }
            ],
            "items": {
              "$ref": "#/components/schemas/link"
            }
          },
          "collections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/collectionInfo"
            }
          }
        }
      },
      "collectionInfo": {
        "required": [
          "links",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "identifier of the collection used, for example, in URIs",
            "example": "buildings"
          },
          "title": {
            "type": "string",
            "description": "human readable title of the collection",
            "example": "Buildings"
          },
          "description": {
            "type": "string",
            "description": "a description of the features in the collection",
            "example": "Buildings in the city of Bonn."
          },
          "links": {
            "type": "array",
            "example": [
              {
                "href": "http://data.example.org/collections/buildings/items",
                "rel": "item",
                "type": "application/geo+json",
                "title": "Buildings"
              },
              {
                "href": "http://example.org/concepts/building.html",
                "rel": "describedBy",
                "type": "text/html",
                "title": "Feature catalog for buildings"
              }
            ],
            "items": {
              "$ref": "#/components/schemas/link"
            }
          },
          "extent": {
            "$ref": "#/components/schemas/extent"
          },
          "crs": {
            "type": "array",
            "description": "The coordinate reference systems in which geometries may be retrieved. Coordinate reference systems are identified by a URI. The first coordinate reference system is the coordinate reference system that is used by default. This is always \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\", i.e. WGS84 longitude/latitude.",
            "items": {
              "type": "string"
            },
            "default": [
              "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
            ]
          }
        }
      },
      "extent": {
        "type": "object",
        "description": "The extent of the features in the collection. In the Core only spatial and temporal\nextents are specified. Extensions may add additional members to represent other\nextents, for example, thermal or pressure ranges.",
        "properties": {
          "spatial": {
            "type": "object",
            "properties": {
              "bbox": {
                "description": "One or more bounding boxes that describe the spatial extent of the dataset.\nIn the Core only a single bounding box is supported. Extensions may support\nadditional areas. If multiple areas are provided, the union of the bounding\nboxes describes the spatial extent.",
                "type": "array",
                "minItems": 1,
                "items": {
                  "description": "West, south, east, north edges of the bounding box. The coordinates\nare in the coordinate reference system specified in `crs`. By default\nthis is WGS 84 longitude/latitude.",
                  "type": "array",
                  "minItems": 4,
                  "maxItems": 6,
                  "items": {
                    "type": "number"
                  },
                  "example": [
                    -180,
                    -90,
                    180,
                    90
                  ]
                }
              },
              "crs": {
                "description": "Coordinate reference system of the coordinates in the spatial extent\n(property `bbox`). The default reference system is WGS 84 longitude/latitude.\nIn the Core this is the only supported coordinate reference system.\nExtensions may support additional coordinate reference systems and add\nadditional enum values.",
                "type": "string",
                "enum": [
                  "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
                ],
                "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.\nThe value `null` is supported and indicates an open time interval.\nIn the Core only a single time interval is supported. Extensions may support\nmultiple intervals. If multiple intervals are provided, the union of the\nintervals describes the temporal extent.",
                "type": "array",
                "minItems": 1,
                "items": {
                  "description": "Begin and end times of the time interval. The timestamps\nare in the coordinate reference system specified in `trs`. By default\nthis is the Gregorian calendar.",
                  "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\n(property `interval`). The default reference system is the Gregorian calendar.\nIn the Core this is the only supported temporal reference system.\nExtensions may support additional temporal reference systems and add\nadditional 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": {
        "required": [
          "features",
          "type"
        ],
        "type": "object",
        "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": "dateTime"
          },
          "numberMatched": {
            "minimum": 0,
            "type": "integer"
          },
          "numberReturned": {
            "minimum": 0,
            "type": "integer"
          }
        }
      },
      "featureGeoJSON": {
        "required": [
          "geometry",
          "properties",
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Feature"
            ]
          },
          "geometry": {
            "$ref": "#/components/schemas/geometryGeoJSON"
          },
          "properties": {
            "type": "object",
            "nullable": true
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              }
            ]
          }
        }
      },
      "geometryGeoJSON": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Point",
              "MultiPoint",
              "LineString",
              "MultiLineString",
              "Polygon",
              "MultiPolygon",
              "GeometryCollection"
            ]
          }
        }
      }
    },
    "parameters": {
      "limit": {
        "name": "limit",
        "in": "query",
        "description": "The optional limit parameter limits the number of items that are\npresented in the response document.\n\nOnly items are counted that are on the first level of the collection in\nthe response document. Nested objects contained within the explicitly\nrequested items shall not be counted.\n\n* Minimum = 1\n* Maximum = 10000\n* Default = 10\n",
        "required": false,
        "style": "form",
        "explode": false,
        "schema": {
          "maximum": 10000,
          "minimum": 1,
          "type": "integer",
          "default": 10
        }
      },
      "bbox": {
        "name": "bbox",
        "in": "query",
        "description": "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 (elevation or depth):\n* Lower left corner, coordinate axis 1 * Lower left corner, coordinate axis 2 * Lower left corner, coordinate axis 3 (optional) * Upper right corner, coordinate axis 1 * Upper right corner, coordinate axis 2 * Upper right corner, coordinate axis 3 (optional)\nThe coordinate reference system of the values is WGS84 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`.\nFor WGS84 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).\nIf 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.\n",
        "required": false,
        "style": "form",
        "explode": false,
        "schema": {
          "maxItems": 6,
          "minItems": 4,
          "type": "array",
          "items": {
            "type": "number"
          }
        }
      },
      "time": {
        "name": "time",
        "in": "query",
        "description": "Either a date-time or a period string that adheres to RFC 3339. Examples:\n* A date-time: \"2018-02-12T23:20:50Z\" * A period: \"2018-02-12T00:00:00Z/2018-03-18T12:31:12Z\" or \"2018-02-12T00:00:00Z/P1M6DT12H31M12S\"\nOnly features that have a temporal property that intersects the value of `time` are selected.\nIf 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.",
        "required": false,
        "style": "form",
        "explode": false,
        "schema": {
          "type": "string"
        }
      },
      "collectionId": {
        "name": "collectionId",
        "in": "path",
        "description": "Identifier (name) of a specific collection",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string"
        }
      },
      "featureId": {
        "name": "featureId",
        "in": "path",
        "description": "Local identifier of a specific feature",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string"
        }
      }
    }
  }
}