AnyOfSchema class

Schema class representing a value that can conform to any of the provided sub-schemas. This is useful when a field can accept multiple distinct types or structures.

Signature:

exportdeclareclassAnyOfSchemaextendsSchema

Extends:Schema

Constructors

ConstructorModifiersDescription
(constructor)(schemaParams)Constructs a new instance of theAnyOfSchema class

Properties

PropertyModifiersTypeDescription
anyOfTypedSchema[]

AnyOfSchema.(constructor)

Constructs a new instance of theAnyOfSchema class

Signature:

constructor(schemaParams:SchemaParams &{anyOf:TypedSchema[];});

Parameters

ParameterTypeDescription
schemaParamsSchemaParams & { anyOf:TypedSchema[]; }

AnyOfSchema.anyOf

Signature:

anyOf:TypedSchema[];

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-17 UTC.