Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Walk items schema instead of walking instance data #993

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

justin-tay
Copy link
Contributor

Closes #989

This changes the behavior of the walk for the item walk listener to walk the schema instead of walking the instance data. All the relevant item schemas will be called at least once with null as the instance node (This is not the same as NullNode which is a node with a value of null while null is the absence of the node) when there is no applicable instance data.

This also fixes the incorrect schemaLocation and evaluationPath used for the tuple schemas for prefixItems.

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2024

Codecov Report

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

Project coverage is 78.73%. Comparing base (3416e28) to head (05e5fd0).

Files Patch % Lines
...main/java/com/networknt/schema/ItemsValidator.java 66.26% 22 Missing and 6 partials ⚠️
...ava/com/networknt/schema/PrefixItemsValidator.java 48.14% 11 Missing and 3 partials ⚠️
...java/com/networknt/schema/DynamicRefValidator.java 0.00% 11 Missing ⚠️
...ava/com/networknt/schema/ItemsValidator202012.java 30.00% 4 Missing and 3 partials ⚠️
...va/com/networknt/schema/RecursiveRefValidator.java 81.81% 0 Missing and 2 partials ⚠️
...java/com/networknt/schema/PropertiesValidator.java 80.00% 0 Missing and 1 partial ⚠️

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

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #993      +/-   ##
============================================
- Coverage     78.81%   78.73%   -0.09%     
- Complexity     1927     1955      +28     
============================================
  Files           172      172              
  Lines          6213     6334     +121     
  Branches       1205     1247      +42     
============================================
+ Hits           4897     4987      +90     
- Misses          861      881      +20     
- Partials        455      466      +11     

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

@stevehu stevehu merged commit aeb48e2 into networknt:master Mar 19, 2024
4 checks passed
@justin-tay justin-tay deleted the gh989 branch March 20, 2024 02:00
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.

Walk in ItemsValidator202012 uses different path than ItemValidator
3 participants