I’m running my OpenAPI schema through an audit process and, in two scenarios, it is complaining that the schema defines arrays without specifying maxItems
. The two scenarios are:
a) APIs that return paginated information, and the API itself allows the size of the page to be set.
b) APIs that return arrays of errors.
In both cases, I am unable to specify an absolute number. The first one can be overridden, and the second one depends on how many errors occur.
In theory, I could put a stupidly high number in the schema, like 1 million, but is there a better way to handle this or is that the only workaround?