Skip to main content

valid-items-type

Overview

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

The type of the items array specified using property type of the Items Object must have only one of the following values: string, number, integer, boolean, or array. Other types are not supported or allowed.

PropertyValue
EnabledYes
Maximum SeverityError
MessageInvalid type of items found.
CodeSWAGGER20STANDARDS_V151
TypeValidation
Rule SystemSemantic
Broad CategoryArray Items
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation type items object items

Suggested Fixes

  • Value of items type is compared in a case-sensitive manner.
  • Ensure that the items type value matches exactly with the possible list of values and that there are no typos: string, number, integer, boolean, or array.
  • Ensure that the value for items type is not null or empty.

For More Information