jhthorsen/json-validator

Differences between 3.0 and 3.1

Opened this issue · 0 comments

yewtc commented
  • JSON::Validator version: 5.14
  • Perl version: 5.32 (+ others)
  • Operating system: Centos 7 (+others Fedora 39, ubuntu 22, ...)

Steps to reproduce the behaviour

Valid 3.0.1 data is failing to validate,

Expected behavior

It should validate

Actual behavior

It doesn't.

Between 3.0 and 3.1 the meaning of exclusiveMinimum and exclusiveMaximum changed. The behaviour of the code is as for 3.1.

Versions of openapi before 3.1 used an older version of the JSON schema. Specifically it used to be that exclusiveMinmum was a boolean rather than a value. The effect is that pre 3.1 schemas are checked against "true" which equates to 1 in perl terms.