no-base-schema-property-re-declaration
Overview
This rule belongs to the openapi-v3-apimatic-linting
ruleset and states that:
When using the allOf
keyword to combine multiple schemas, each schema should define unique properties. It appears that there is a duplicate property that already exists in one of the schemas defined within the allOf array.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Property already exists in one of the schemas defined in allOf . |
Code | OPENAPI3APIMATIC_L701 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Schemas |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi apimatic semantic linting base schema property redeclaration discriminator |
Suggested Fixes
- Ensure that each schema within the allOf array has unique property names.
- Remove or rename the duplicate property within the affected schema(s).
For More Information
- https://www.apimatic.io/
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#schema-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#discriminator-object
- https://docs.apimatic.io/rulesets/overview/