I am using https://github.com/everit-org/json-schema library to do serverside validation for JSONSchema it is failing when i use dataref in maximum validation
my schema property is like
"fromYear": {
"array": false,
"type": "number",
"title": "From Year",
"minimum": {
"$data": "1/toYear"
},
"key": "fromYear",
"required": false
}
but when we call validate method of Schema then it throws error like
"#/properties/qualificationsection/items/properties/fromYear/minimum: expected type: Number, found: JsonObject"
JSON Schema supports minimum number as well as a jsonobject (ie., it supports union types) where we can specify data ref.
The library is unable to deal with this as is expecting minumum to always be of type number