kin-openapi has some functionality where it checks that defaults and examples match the schema, and that formats match types and patterns are valid. This can, for example, reject the following schema:
{
"properties": {
"num": {
"default": 1,
"description": "Number of things",
"maximum": 10,
"minimum": 2,
"title": "Num",
"type": "integer",
"x-order": 0
}
},
"title": "Input",
"type": "object"
}
Could this be implemented in libopenapi-validator?