opengeospatial / ets-ogcapi-features10

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

Abstract Test 22 - maximum behaviour check if maximum is not specified crashes #196

Closed jnystad closed 11 months ago

jnystad commented 1 year ago

Describe the bug A maximum limit value is not required. This test should be skipped if limit has no specified maximum.

Crash:

java.lang.NullPointerException: Cannot invoke "java.lang.Number.intValue()" because the return value of "com.reprezen.kaizen.oasparser.model3.Schema.getMaximum()" is null

(Implements A.2.7. Features {root}/collections/{collectionId}/items, Abstract Test 22, Test Method 6 (Requirement /req/core/fc-response) - Abstract Test 25 (Requirement /req/core/fc-numberMatched))

Expected behavior Skip test if no maximum is set.

dstenger commented 1 year ago

Thank you for reporting. We will do further investigation.

ghobona commented 1 year ago

Indeed, the Abstract Test states that "If the API definition specifies a maximum value for limit parameter, verify that the count does not exceed this maximum value."

The code you are referring to is only executed if the limit parameter is specified in the API definition document.

I do agree that the code mistakenly assumes that if a limit is declared, then both the minimum and maximum limits are declared. The CITE team will look into improving the relevant code to make the maximum value of the limit optional, as implied in the Abstract Test.

dstenger commented 1 year ago

@jnystad Is it possible that you provide an publicly available API to test our fix?

jnystad commented 1 year ago

No, sorry, still no public API available from us.