This pull request includes changes to enhance the handling of nullable references in the JSON Schemer library. The main updates involve adding a check for nullable references in the validation process and introducing a new test case to ensure the functionality works as expected.
Enhancements to nullable reference handling:
lib/json_schemer/draft202012/vocab/core.rb: Updated the validate method to check if the instance is nil and if any dynamic scope contains a nullable value, returning a successful result in such cases.
Testing improvements:
test/open_api_test.rb: Added a new test case test_nullable_ref to validate schemas with nullable references, ensuring they are correctly recognized and validated by the schemer.
This pull request includes changes to enhance the handling of nullable references in the JSON Schemer library. The main updates involve adding a check for nullable references in the validation process and introducing a new test case to ensure the functionality works as expected.
Enhancements to nullable reference handling:
lib/json_schemer/draft202012/vocab/core.rb
: Updated thevalidate
method to check if the instance isnil
and if any dynamic scope contains anullable
value, returning a successful result in such cases.Testing improvements:
test/open_api_test.rb
: Added a new test casetest_nullable_ref
to validate schemas with nullable references, ensuring they are correctly recognized and validated by the schemer.