Skip to content

WFS3 Probes (OAPIF) - use correct media types to get OpenAPI doc from landing page #304

Description

@justb4

Describe the bug
The WFS3Drilldown Probe currently assumes that the URL to the JSON-format OpenAPI doc from the landing page is the first link element that has rel: service-desc. This is not correct in two ways:

  • there may be multiple link elements with rel: service-desc (e.g. JSON and YAML)
  • the media type is not taken in consideration.

To Reproduce
Steps to reproduce the behavior, e.g.:

  1. Register a Resource with multiple rel: service-desc links e.g.
    http://ows.geo-solutions.it/geoserver/ogc/features/?f=application%2Fjson
  2. Run any WFS3 Probe e.g. with OpenAPI Validation
  3. See error

Expected Behavior
According to http://docs.opengeospatial.org/is/17-069r3/17-069r3.html#mediatypes
"The media type for an OpenAPI 3.0 definition is vnd.oai.openapi+json;version=3.0 (JSON) or . application/vnd.oai.openapi;version=3.0 (YAML)."

So the Probes need to search for vnd.oai.openapi+json;version=3.0 type to get JSON OpenAPI description.

Screenshots or Logfiles
NA

Context (please complete the following information):

  • Any
  • GeoHealthCheck Version [latest on nov 14, 2019]

If running with Docker:
N.A.

Additional context
This really should be implemented in the OWSLib WFS3 client which has a function to return api(). There the ultimate implementation should be. Probably searching for any of the two media types (JSON or YAML). An OWSLib issue 630 has been opened for this.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions