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
800 stars 320 forks source link

Adds JsonNodeReader #1065

Closed justin-tay closed 3 weeks ago

justin-tay commented 3 weeks ago

Adds an JsonNodeReader interface to abstract out the logic for reading content into a JsonNode.

This will make it easier to customize how the reading is done with a custom implementation. This also potentially allows easier reuse of the logic of reading location aware nodes by trying to decouple this from the JsonSchemaFactory.

This deprecates the setting of jsonMapper and yamlMapper on the JsonSchemaFactory in favor of the jsonNodeReader.

codecov-commenter commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 64.28571% with 15 lines in your changes missing coverage. Please review.

Project coverage is 78.68%. Comparing base (48ca3c2) to head (8953fe8). Report is 31 commits behind head on master.

Files Patch % Lines
...nt/schema/serialization/DefaultJsonNodeReader.java 60.60% 9 Missing and 4 partials :warning:
...n/java/com/networknt/schema/JsonSchemaFactory.java 75.00% 1 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 #1065 +/- ## ============================================ - Coverage 78.90% 78.68% -0.22% - Complexity 1965 2053 +88 ============================================ Files 172 198 +26 Lines 6352 6635 +283 Branches 1255 1249 -6 ============================================ + Hits 5012 5221 +209 - Misses 867 936 +69 - Partials 473 478 +5 ```

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