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

Geonovum OGC-API validator finds more errors than the Cite-validator #244

Open
PB-GNM opened this issue Aug 21, 2024 · 2 comments
Open

Geonovum OGC-API validator finds more errors than the Cite-validator #244

PB-GNM opened this issue Aug 21, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@PB-GNM
Copy link

PB-GNM commented Aug 21, 2024

Describe the bug
Geonovum has build an online OGC-API validator: https://geonovum-labs.github.io/ogc-checker/?#/ogc-api
It seems to find more errors than the cite-validator does.

Is the Geonovum validator to strict, or is the Cite-validator not strict enough?

To Reproduce
Steps to reproduce the behaviour:
Test https://geonovum-labs.github.io/ogc-checker/?#/ogc-api with:
https://apitestbed.geonovum.nl/adr_pygeoapi/v1/openapi.json
https://geonovum.geosolutionsgroup.com/geoserver/inspire/ogc/features/v1/openapi.json
https://test.haleconnect.de/ogcapi/datasets/simplified-addresses/v1/openapi.json

Expected behavior
No errors were expected, since the 3 API's had no error in the cite-validator

Screenshots
image

Additional context
Geonovum was asked to report this problem here as an issue and to show the found errors in relation to the requirements. See below:

On https://apitestbed.geonovum.nl/adr_pygeoapi/v1/openapi.json :

[/req/oas30/oas-definition-2] The JSON representation SHALL conform to the OpenAPI Specification, version 3.0. "enum" property must not have fewer than 1 items.
[22 times on several requirement] A successful execution of the operation SHALL be reported as a response with a HTTP status code 200. Response schema is not compatible. Property "rel" must be required. (schema path: "links")
[/req/core/conformance-success] A successful execution of the operation SHALL be reported as a response with a HTTP status code 200. Response schema is not compatible. Property "conformsTo" must be required. Required property "conformsTo" is missing.

on https://geonovum.geosolutionsgroup.com/geoserver/inspire/ogc/features/v1/openapi.json :
[/req/oas30/oas-definition-2] The JSON representation SHALL conform to the OpenAPI Specification, version 3.0. Operation must define parameter "{collectionId}" as expected by path "/collections/{collectionId}/search".
[5 times on several requirement] A successful execution of the operation SHALL be reported as a response with a HTTP status code 200. Response schema is not compatible. Property "rel" must be required. (schema path: "links")

on https://test.haleconnect.de/ogcapi/datasets/simplified-addresses/v1/openapi.json :
[/req/core/f-response] A successful execution of the operation SHALL be reported as a response with a HTTP status code 200.
[/req/core/sfc-md-success] A successful execution of the operation SHALL be reported as a response with a HTTP status code 200.
[/req/core/conformance-success] A successful execution of the operation SHALL be reported as a response with a HTTP status code 200.
[/req/core/fc-md-success] A successful execution of the operation SHALL be reported as a response with a HTTP status code 200.
[/req/core/fc-bbox-definition] The operation SHALL support a parameter bbox. Parameter object is not compatible with: {"name":"bbox","in":"query","explode":false,"schema":{"type":"array","oneOf":[{"minItems":4,"maxItems":4},{"minItems":6,"maxItems":6}],"items":{"type":"number"}}}.
[/req/core/fc-response] A successful execution of the operation SHALL be reported as a response with a HTTP status code 200.
[/req/core/root-success] A successful execution of the operation SHALL be reported as a response with a HTTP status code 200.

Regards,
Pieter Bresters

@dstenger
Copy link
Contributor

Thanks for reporting.
We will do further investigation and come back to you as soon as we have results.

@dstenger dstenger added the question Further information is requested label Aug 21, 2024
@dstenger dstenger added this to CITE Aug 21, 2024
@github-project-automation github-project-automation bot moved this to To do in CITE Aug 21, 2024
@dstenger
Copy link
Contributor

dstenger commented Aug 22, 2024

This test suite covers following conformance classes:

  • Core
  • Coordinate Reference Systems by Reference

Also see https://cite.ogc.org/te2/about/ogcapi-features-1.0/1.0/site/.

The Geonovum validator only lists other conformance classes (oas30 and geojson) for
https://apitestbed.geonovum.nl/adr_pygeoapi/v1/openapi.json
https://geonovum.geosolutionsgroup.com/geoserver/inspire/ogc/features/v1/openapi.json

https://test.haleconnect.de/ogcapi/datasets/simplified-addresses/v1/openapi.json also contains Core failures.

Checking https://test.haleconnect.de/ogcapi/datasets/simplified-addresses/v1/openapi.json more in detail

For most requests there is no HTTP status code 200 returned.
I guess that following entry of the tested API is not correct:

...
  "servers": [
    {
      "url": "/ogcapi/datasets/simplified-addresses/v1"
    }
  ],
...

The CITE test suite has a fallback for this case just appending the path to the URL of the landing page if the server url does not contain the path of the landing page.

Is there a way to retrieve the exact requests the Geonovum validator is sending? Otherwise, it is hard to reproduce the reported errors.

@mbrachman mbrachman self-assigned this Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: To do
Development

No branches or pull requests

4 participants