Normalise OpenAPI 3.0.x discriminator keyword by injecting const
values into each oneOf/anyOf option's discriminator property.
In OpenAPI 3.0, discriminator is a sibling of oneOf/anyOf:
discriminator: { propertyName: "type" }
The walker detects discriminated unions from oneOf + const on a
property, so this normaliser injects the const values from the
mapping or infers them from $ref fragment names.
Normalise OpenAPI 3.0.x
discriminatorkeyword by injectingconstvalues into eachoneOf/anyOfoption's discriminator property.In OpenAPI 3.0,
discriminatoris a sibling ofoneOf/anyOf:discriminator: { propertyName: "type" }The walker detects discriminated unions fromoneOf+conston a property, so this normaliser injects theconstvalues from themappingor infers them from$reffragment names.