Я использую ajv для проверки запроса тела.С каждым приходящим запросом, ajv работает нормально, но всегда записывает сообщение ' $ ref: ключевые слова игнорируются в схеме по пути "#" '
У меня 2 схемы, вход.json & login.defs.json
login.defs.json для определения общего определения схемы и login.json обратитесь к нему.
login.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"$id": "http://blog-js.com/login.schema#",
"$ref": "login.defs#/definitions/login"
}
login.defs.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://blog-js.com/login.defs#",
"additionalProperties": false,
"definitions": {
"login": {
"type": "object",
"required": [
"account",
"password"
],
"properties": {
"account": {
"description": "The account or email of user",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"password": {
"description": "The password of user",
"type": "string",
"minLength": 1,
"maxLength": 32
}
}
}
}
}
Скажите, пожалуйстамне что плохого я сделал?