Skip to main content

parameter-non-negative-max-items

Overview

This rule belongs to the swagger-v2-standards-validation ruleset and states that:

The numeric validation keyword maxItems for the parameter, must have a non-negative integer value i.e. the value must be greater than or equal to 0.

PropertyValue
EnabledYes
Maximum SeverityError
MessageValue of property maxItems is less than 0 for parameter.
CodeSWAGGER20STANDARDS_V117
TypeValidation
Rule SystemSemantic
Broad CategoryParameters
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation max items number integer arrays json schema validation json schema

Suggested Fixes

  • Ensure that the value for the validation keyword is a valid integer.
  • Ensure that the value is not less than 0 i.e. a negative value.

For More Information