OpenAPIUtils.identifyTestPoints misses some paths
Closed this issue · 3 comments
ghobona commented
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:
- Test the following endpoint https://planetarycomputer.microsoft.com/api/stac/v1.
- Check whether identifyTestPoints detects the
/conformance
path.
Expected behavior
Expected the condition to detect that the paths endsWith /conformance
.
dstenger commented
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.