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.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | A circular reference found in global type combinators definition. |
| Code | APIMATICPRE_V589 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Global Types/Models |
| Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
| Tags | preliminary 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.