Interface DiscriminatorSpec

Define an object exposing a couple of methods that are used to discriminate between subschema.

Hierarchy

  • DiscriminatorSpec

Methods

  • This method is invoked during deserialization to check if the data should be deserialized as the specific type.

    Returns

    true if the json matched the discriminator condition.

    Parameters

    • src: any

      An object to inspect

    Returns boolean

  • If available this method is invoked during serialization and is meant to add discriminator information to the result json.

    Parameters

    • result: any

      The result of the deserialization

    Returns void

Generated using TypeDoc