ajv-validator / ajv-validator/ajv
Do not short-circuit anyOf with allErrors option
- Linguagem predominante
- TypeScript
- Estrelas
- 14.8k
- Forks
- 1k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
**Problem**
Allow some advanced logic for data validation based on annotation keywords etc.
**Solution**
Do not short-circuit anyOf keyword with allErrors: true option
Provide a separate option to override this behaviour (e.g. shortCircuit) that would override the default behaviour for allOf any anyOf.
Logic when keywords are short-circuited after the change (changed behaviour in bold):
|allErrors →
shortCircuit ↓|false|true|
|---|:-:|:-:|
|undefined|allOf: short
anyOf: short|allOf: full
anyOf: **full**|
|false|allOf: **full**
anyOf: **full**|allOf: full
anyOf: **full**|
|true|allOf: short
anyOf: short|allOf: **short**
anyOf: short|
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.