json-schema icon indicating copy to clipboard operation
json-schema copied to clipboard

Bug: Integer & Number exclusive restrictions not working

Open bhargavrpatel opened this issue 2 years ago • 0 comments

Context I am not seeing a failure on exclusive minimum and exclusive maximum restrictions.

How to reproduce

schema = {
  "properties" => {
    "rank" => {
      "type" => "integer",
      "description" => "Rank of the object",
      "exclusiveMinimum" => 1,
    }
  },
  "required": ["rank"]
}

JSON::Validator.validate!(schema, {"rank" => 1}, strict: true)
# => true

Expectation This should have failed per other schema validators image

bhargavrpatel avatar Oct 31 '22 18:10 bhargavrpatel