This PR adds initial discriminator keyword support.
According to a not-yet-released update to the specification (https://github.com/OAI/OpenAPI-Specification/pull/2618), the discriminator keyword is an annotation keyword, that SHOULD fail the validation when no schema can be determined.
We also use discriminator keyword annotation in anyOf and oneOf keywords to reorder the list of schemas, which might increase performance of validation later with introduction of short circuit errors.
This PR adds initial
discriminator
keyword support.According to a not-yet-released update to the specification (https://github.com/OAI/OpenAPI-Specification/pull/2618), the
discriminator
keyword is an annotation keyword, that SHOULD fail the validation when no schema can be determined.We also use
discriminator
keyword annotation inanyOf
andoneOf
keywords to reorder the list of schemas, which might increase performance of validation later with introduction of short circuit errors.