ajv-validator/ajv-errors

support $ref

rpedela opened this issue · 0 comments

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.

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

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