opengeospatial/ets-ogcapi-features10

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

Closed this issue · 4 comments

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.

Thank you for reporting. We will do further investigation.

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.

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

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