ajv-validator / ajv-validator/ajv

Add support of the anyOf keyword for discriminator

Aperta
#2,046 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
TypeScript
Stelle
14.8k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**What version of Ajv you are you using?**
**8.6.0**

**What problem do you want to solve?**
According to the OpenAPI specification, the `discriminator` object is legal only when using one of the composite keywords `oneOf`, `anyOf`, `allOf`.

But now the user with valid definition will see an error if `anyOf` or `allOf` was used.

**What do you think is the correct solution to the problem?**
It would be great to have support for at least `oneOf` and `anyOf` in the project.

**Will you be able to implement it?**
Yes, I'm planning to create a PR in the nearest time.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.