unique-schema-types
Overview
This rule belongs to the openapi-v3-standards-validation
ruleset and states that:
If multiple types are listed in the Schema Object using the type
property, each type name in this array/list must be unique.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Duplicate entry found for type name in the Schema Object type array. |
Code | OPENAPI3STANDARDS_V341 |
Type | Validation |
Rule System | Semantic |
Broad Category | Schemas |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic validation type json schema schema |
Suggested Fixes
- Remove duplicate type name entries from the Schema Object
type
list. - Type 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.1.1
- 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/