Skip to main content

atleast-one-type-combinator-set-in-global-type-combinators

Overview

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

A global type combinators definition expects at least one type combinator definition e.g. anyOf, oneOf, not. This means that the type cases in a type combinator must contain at least one type case.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageNo type combinator found in the global type combinators definition.
CodeAPIMATICPRE_L196
TypeLinting
Rule SystemSemantic
Broad CategoryTypes/Models
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary checks linting apimatic global type combinators type combinator type cases anyOf oneOf not

Suggested Fixes

  • If the type combinators entry is not expected to contain any type combinator (anyOf, oneOf, not), it is recommended to remove this entry and update references accordingly.
  • Add at least one type combinator (anyOf, oneOf, not) in the global type combinators entry.
  • A type combinator (anyOf, oneOf, not), when specified, must contain at least one type definition/case.