unique-properties-in-schema-required-list
Overview
This rule belongs to the swagger-v2-standards-validation
ruleset and states that:
A property can only be marked as required once in the list of required properties, specified using property required
of the Schema Object i.e. the items in this list must be unique and must be strings.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Property is already marked as required. |
Code | SWAGGER20STANDARDS_V312 |
Type | Validation |
Rule System | Semantic |
Broad Category | Schemas |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | swagger2 swagger standards semantic validation required properties property name object json schema validation json schema |
Suggested Fixes
- Remove redundant entry for the property name in the list.
- Ensure that the items in the list are unique.
- Items in the list are compared in a case-sensitive manner.