jhthorsen/json-validator

validation fails on an attribute that has nullable: true if there is also an enum

mschout opened this issue · 3 comments

  • JSON::Validator version: 4.21
  • Perl version: 5.30
  • Operating system: Ubuntu 20.04

Steps to reproduce the behavior

Schema validation is rejected for a nullable: true item if it has an enum

Expected behavior

The schema should be considered valid with a null value even if it has an enum if nullable: true is also present.

Actual behavior

The schema validation fails.

I will make a PR to address this later this evening -- I ran out of time.

Please choose the correct label: draft4, ... openapi2/3. It's impossible to solve this issue when there's no example schema or schema version to work with.

I'm going to close this, since #257 will be merged sooner or later...

Please choose the correct label: draft4, ... openapi2/3. It's impossible to solve this issue when there's no example schema or schema version to work with.

Sorry, example schema was in the PR :)