opengeospatial/ets-ogcapi-features10

OpenAPIUtils.identifyTestPoints misses some paths

Closed this issue · 3 comments

Describe the bug

The OpenAPIUtils.identifyTestPoints method is unable to detect matches between paths that extend from the path being detected. For example, in the following case it was comparing API paths that started with /api/abc/v1 and it could not match /api/abc/v1/conformance to /conformance.

/api/stac/v1/ CHECK /conformance FALSE
/api/stac/v1/conformance CHECK /conformance  FALSE
/api/stac/v1/collections/{collection_id}/items/{item_id} CHECK /conformance  FALSE
/api/stac/v1/search CHECK /conformance  FALSE
/api/stac/v1/collections CHECK /conformance  FALSE
/api/stac/v1/collections/{collection_id} CHECK /conformance  FALSE
/api/stac/v1/collections/{collection_id}/items CHECK /conformance  FALSE
/api/stac/v1/queryables CHECK /conformance  FALSE
/api/stac/v1/collections/{collection_id}/queryables CHECK /conformance  FALSE

To Reproduce
Steps to reproduce the behavior:

  1. Test the following endpoint https://planetarycomputer.microsoft.com/api/stac/v1.
  2. Check whether identifyTestPoints detects the /conformance path.

Expected behavior

Expected the condition to detect that the paths endsWith /conformance.

Might be related to #117.

When checking the OpenAPI document, we detected following:

...
  "servers": [
    {
      "url": "/api/stac/v1"
    }
  ],
...
  "paths": {
...
    "/api/stac/v1/conformance": {
...

It seems that the path /api/stac/v1 is declared multiple times.

@dstenger Ok, thanks. It seems it is not a problem with the ETS. So I'm closing this issue.