opengeospatial / ets-ogcapi-features10

Public Repository for the OGC API - Features Compliance Test Suite
Other
16 stars 6 forks source link

Abstract Test 16 - limit parameter tests fail if minimum is 0 #195

Closed jnystad closed 11 months ago

jnystad commented 1 year ago

Describe the bug

With minimum set to 0:

java.lang.AssertionError: Expected property 'schema -> minimum' to be an integer greater than 0, but was '0'.

(A.2.7. Features {root}/collections/{collectionId}/items - Limit, Abstract Test 16: (Requirement /req/core/fc-limit-definition))

Limit minimum/maximum can be decided by the server, and minimum 0 is not disallowed

Expected behavior Test should allow minimum limit value to be 0.

Additional context Abstract Test 16 wording: Verify that the limit query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):

name: limit
in: query
required: false
schema:
  type: integer
style: form
explode: false

Note that the API can define values for "minimum", "maximum" and "default".

dstenger commented 1 year ago

Thank you for reporting. We will do further investigation.

dstenger commented 1 year ago

@jnystad Do you have a test service we can use to reproduce the error? If not, can you please provide the used OpenAPI document?

jnystad commented 1 year ago

Sorry, not allowed to share it in its entirety at the moment.

The parameter has this spec:

{
            "name": "limit",
            "in": "query",
            "description": "Max results",
            "style": "form",
            "explode": false,
            "schema": {
              "maximum": 1000,
              "minimum": 0,
              "type": "integer",
              "default": 100
            }
          },