ajv-validator / ajv-validator/ajv-errors

support $ref

Aperta
#18 0 commenti 9 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
289
Fork
21
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I would love to see support added for the ```$ref``` keyword. I have several error messages that are used throughout my schemas, and it would be helpful to only have to define them once.

```js
// error schema
{
"$id": "errors",
"string": "must be a string",
"basicObject": {
"type": { "$ref": "#/string" }
}
}

// schema
{
"type": "string",
"errorMessage": { "$ref": "errors#/basicObject" }
}
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.