OneOfPropertyDefinition

data class OneOfPropertyDefinition(val oneOf: List<PropertyDefinition>, val discriminator: Discriminator? = null, val description: String? = null) : PropertyDefinition(source)

Represents a oneOf schema composition.

Validates that the instance matches exactly one of the provided schemas. Commonly used for polymorphic types with mutually exclusive alternatives.

See also

Constructors

Link copied to clipboard
constructor(oneOf: List<PropertyDefinition>, discriminator: Discriminator? = null, description: String? = null)

Properties

Link copied to clipboard

Optional description of the property

Link copied to clipboard

Optional discriminator to efficiently determine which schema applies

Link copied to clipboard

List of property definitions representing the alternatives. Must contain at least 2 options.