legacyDiscriminatorBehavior property

bool legacyDiscriminatorBehavior
final

Set to true for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).

true The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.

false The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.

Implementation

final bool legacyDiscriminatorBehavior;