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.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Invalid type of items found. |
Code | SWAGGER20STANDARDS_V151 |
Type | Validation |
Rule System | Semantic |
Broad Category | Array Items |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | swagger2 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
, orarray
. - Ensure that the value for items type is not null or empty.