This rule belongs to the
apimatic-preliminary-linting ruleset and states that:
A model containing one or more required fields (whether inherited or not) which reference the same model either directly or indirectly indicates presence of a circular dependency. Referencing a model (say A) indirectly means the field(s) references another model (say B) which may contain one or more fields that directly or indirectly reference the model under consideration (A).
|Message||Circular dependency detected in model.|
|Products Impacted||Code Generation, Developer Experience Portal, API Transformer|
- A dependency chain like A -> B indicates that one or more fields of model A reference a model B which contains one or more fields that reference back to model A.
- Model indicated at the end of the dependency chain contains one or more fields that reference the model which is under consideration.
- Models containing circular dependencies via required fields is not recommended and may cause issues.