ajv-validator / ajv-validator/ajv

Add support of the anyOf keyword for discriminator

Abierto
#2,046 3 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
TypeScript
Estrellas
14.8k
Forks
1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.