Skip to content

Conversation

justin-tay
Copy link
Contributor

This pull request forms the bulk of changes for 2.x.

The next change will be to refactor the evaluation state out of the validators. This reduces the out of memory issues when schemas use a lot of oneOf, anyOf, allOf but impacts performance.

Major Changes

  • Configuration on a per Schema basis is no longer possible and is done on the Factory instead
  • Removal of deprecated methods and functionality from 1.x.
  • Major renaming of many of the public APIs and moving of classes into sub-packages.
  • Errors are returned as a List instead of a Set.
  • Error messages do not have the instanceLocation as part of the message
  • External resources will not be automatically fetched by default. This now requires opt-in via configuration.
    • This is to conform to the specification that requires such functionality to be disabled by default to prefer offline operation. Note however that classpath resources will still be automatically loaded.

…alidationContext to SchemaRegistry and refactor

Rename JsonSchemaWalkerListener to SchemaWalkerListener
Rename DefaultItemWalkListenerRunner to ItemWalkListenerRunner
Rename DefaultKeywordWalkListenerRunner to KeywordWalkListenerRunner
Rename DefaultPropertyWalkListenerRunner to PropertyWalkListenerRunner
Shift walk configuration to WalkConfig
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 82.13935% with 364 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.18%. Comparing base (48ca3c2) to head (8c31de4).
⚠️ Report is 104 commits behind head on master.

Files with missing lines Patch % Lines
...main/java/com/networknt/schema/SchemaRegistry.java 81.37% 27 Missing and 11 partials ⚠️
src/main/java/com/networknt/schema/Schema.java 72.38% 32 Missing and 5 partials ⚠️
...tworknt/schema/keyword/DiscriminatorValidator.java 57.37% 16 Missing and 10 partials ⚠️
...ava/com/networknt/schema/SchemaRegistryConfig.java 80.70% 22 Missing ⚠️
...va/com/networknt/schema/resource/SchemaLoader.java 75.60% 16 Missing and 4 partials ⚠️
...ain/java/com/networknt/schema/dialect/Dialect.java 67.34% 10 Missing and 6 partials ⚠️
...networknt/schema/dialect/BasicDialectRegistry.java 31.81% 13 Missing and 2 partials ⚠️
.../networknt/schema/keyword/DynamicRefValidator.java 48.14% 10 Missing and 4 partials ⚠️
.../schema/keyword/PropertyDependenciesValidator.java 72.91% 10 Missing and 3 partials ⚠️
...tworknt/schema/dialect/DefaultDialectRegistry.java 36.84% 11 Missing and 1 partial ⚠️
... and 49 more
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1198      +/-   ##
============================================
- Coverage     78.90%   78.18%   -0.73%     
+ Complexity     1965     1935      -30     
============================================
  Files           172      199      +27     
  Lines          6352     6564     +212     
  Branches       1255     1161      -94     
============================================
+ Hits           5012     5132     +120     
- Misses          867      999     +132     
+ Partials        473      433      -40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants