Documentation
    Preparing search index...

    Interface IDiscriminator

    Discriminator configuration for tagged unions.

    Specifies which property distinguishes between union variants and maps discriminator values to their corresponding schemas.

    interface IDiscriminator {
        mapping?: Record<string, string>;
        propertyName: string;
    }
    Index

    Properties

    mapping?: Record<string, string>

    Mapping from discriminator values to schema references.

    Keys are the literal values of the discriminator property, values are $ref paths to the corresponding schemas.

    propertyName: string

    Name of the discriminating property.

    This property must exist on all union member object schemas and contain unique literal values that identify each variant.