unique-schema-dependent-required-properties
Overview
This rule belongs to the openapi-v3-standards-validation
ruleset and states that:
Each property in a Schema Object dependentRequired
definition must consist of a list of properties that are dependent on it to be considered as required. The items in this list must be unique.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Duplicate property name found in the list of dependent required properties. |
Code | OPENAPI3STANDARDS_V351 |
Type | Validation |
Rule System | Semantic |
Broad Category | Schemas |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic validation dependent required properties required json schema schema |
Suggested Fixes
- Remove duplicate property names from the list of dependent properties.
- Property names are compared in a case-sensitive manner.
For More Information
- https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#section-6.5.4
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/