I am creating thousands of definitions and making it available on remote so that any one can reuse the defined schema by referring remote ref. at the time of definition creation i want something which can check the $ref and throw error if it is not available
{
"definitions":{
"description100Type":{
"$ref":"#/definitions/additinalType"
}
},
"$schema":"http://json-schema.org/draft-07/schema#",
"$id":"http://example.com/root.json"
}
In the above example description100Type referring additinalType which was not defined. How to validate the above case ? i am using ajv for validations.
note:ajv is throwing proper error if description100Type is referred inside properties
{
"properties":{
"checked":{
"$id":"#/properties/checked",
"$ref":"#/definitions/description100Type"
}
}
}