libopenapi-validator icon indicating copy to clipboard operation
libopenapi-validator copied to clipboard

Feature Request - Document validator: Validate defaults, examples, formats, patterns

Open yorickvP opened this issue 1 year ago • 1 comments

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?

yorickvP avatar Feb 19 '24 19:02 yorickvP

Cool!

daveshanley avatar Feb 22 '24 11:02 daveshanley