anyOf property

  1. @override
List<JSONSchema>? get anyOf
override

An array of Schema objects to validate generated content.

Implementation

@override
List<JSONSchema>? get anyOf => super.anyOf as List<JSONSchema>?;
  1. @override
set anyOf (covariant List<JSONSchema>? value)
covariantoverride

An array of Schema objects to validate generated content.

The generated data must be valid against any (one or more) of the schemas listed in this array. This allows specifying multiple possible structures or types for a single field.

For example, a value could be either a String or an Int:

Schema.anyOf(schemas: [Schema.string(), Schema.integer()]);

Implementation

@override
set anyOf(covariant List<JSONSchema>? value) => super.anyOf = value;