networknt / json-schema-validator

A fast Java JSON schema validator that supports draft V4, V6, V7, V2019-09 and V2020-12
Apache License 2.0
807 stars 320 forks source link

Explicitly handle if the discriminator property value is null #988

Closed justin-tay closed 4 months ago

justin-tay commented 4 months ago

Closes #985

This makes changes such that a missing discriminator property is treated as if the discriminator is ignored.

This does not generate an assertion due to the missing discriminator property to be consistent with

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 93.10345% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 78.81%. Comparing base (0f983b0) to head (be2d8f9).

Files Patch % Lines
...main/java/com/networknt/schema/AnyOfValidator.java 80.00% 0 Missing and 1 partial :warning:
...main/java/com/networknt/schema/OneOfValidator.java 94.73% 0 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #988 +/- ## ============================================ + Coverage 78.76% 78.81% +0.05% - Complexity 1919 1927 +8 ============================================ Files 172 172 Lines 6197 6213 +16 Branches 1199 1205 +6 ============================================ + Hits 4881 4897 +16 Misses 861 861 Partials 455 455 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.