Skip to main content

no-circular-reference-in-global-type-combinators-definition

Overview

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

If a global type combinators definition references another definition (alias or not), the reference must be resolvable and not form any kind of loop.

PropertyValue
EnabledYes
Maximum SeverityError
MessageA circular reference found in global type combinators definition.
CodeAPIMATICPRE_V589
TypeValidation
Rule SystemSemantic
Broad CategoryGlobal Types/Models
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary checks validation apimatic global type combinators definition global type combinators alias global type combinators type combinator type cases anyOf oneOf not alias

Suggested Fixes

  • Ensure that your global type combinators definition does not reference itself, either directly or indirectly via another global type combinators definition.
  • If your global type combinators entry is an alias definition, ensure that the alias resolves into a concrete global type combinators definition.
  • If the global type combinators alias definition needs to reference another alias definition, ensure that the aliases are not referencing each other and forming a loop which can't be resolved.