Skip to main content

no-base-type-field-redeclaration

Overview

This rule belongs to the apimatic-preliminary-linting ruleset and states that:

Fields/properties must not be re-declared in a model if they have already been defined in the model's base type or type hierarchy.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageField already exists in the base type.
CodeAPIMATICPRE_L101
TypeLinting
Rule SystemSemantic
Broad CategoryTypes/Models
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary checks linting apimatic field property base type inheritance type custom type model complex model

Suggested Fixes

  • Remove the field from either the child model or the base model to avoid this issue.

For More Information