Open TiMESPLiNTER opened 1 year ago
Discriminator does not affect the validity of your JSON Schema. It is almost certainly being ignored entirely.
The oneOf and sub schemas should be completely valid in their own right, and the discriniator can even be deleted because they serve pretty much zero purpose once you've got a oneOf on there.
Either way, make your oneOf valid, ignore the disciminator, maybe delete it or comment it out to confirm, and the error will go away.
Describe the bug The
oas3-valid-media-example
rule cannot handle schemas with discriminator and reports various validation errors.In this case it reports 2 errors with the below spec:
To Reproduce
Use this OpenAPI spec to reproduce:
Expected behavior The above API spec should be valid.
Screenshots![image](https://github.com/stoplightio/spectral/assets/598854/cf393b42-f8a3-4ff9-8b4e-71aa6334c21d)
Environment (remove any that are not applicable):
Additional context None.