Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Integer & Number exclusive restrictions not working #473

Open
bhargavrpatel opened this issue Oct 31, 2022 · 0 comments
Open

Bug: Integer & Number exclusive restrictions not working #473

bhargavrpatel opened this issue Oct 31, 2022 · 0 comments

Comments

@bhargavrpatel
Copy link

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 bhargavrpatel changed the title Bug: Integer exclusive restrictions not working Bug: Integer & Number exclusive restrictions not working Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant