Looking to master JSON Schema for OpenAPI?

A 9+ hour course taught by a member of the JSON Schema Technical Steering Committee

discriminator : Object

discriminator

Object

Hints at which of the schemas of an adjacent oneOf, anyOf, or allOf an object instance is expected to satisfy, without affecting the validation outcome.

Value This keyword must be set to an object that declares a propertyName string and optionally a mapping object of string values and a defaultMapping string Hint: Use the jsonschema metaschema and jsonschema lint commands to catch keywords set to invalid values
Kind Other
Applies To Object
Base Dialect 2020-12
Changed In None
Introduced In OpenAPI 3.1
Vocabulary OpenAPI 3.2
Specification https://spec.openapis.org/oas/v3.2.1.html#schema-discriminator
Metaschema https://spec.openapis.org/oas/3.2/meta/2026-02-26
Official Tests None
Default None
Annotation None
Affected By
Affects None
Also See