nextcloud / openapi-extractor

A tool for extracting OpenAPI specifications from Nextcloud source code
https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-openapi.html
GNU Affero General Public License v3.0
7 stars 2 forks source link

invalid use of maxLength in array definitions #124

Closed Leptopoda closed 6 months ago

Leptopoda commented 6 months ago

According to jsonSchema validation the maxLength key only shows affect with String values. See: https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#name-maxlength

For arrays the maxItems property should be used. https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#name-maxitems

All occurrences like the following must be changed:

{
  "type": "array",
  "maxLength": 0
}

Probably to late for 29 :(