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

Allow customization of assertion for outputunit #1033

Closed justin-tay closed 2 months ago

justin-tay commented 2 months ago

Closes #1030

This adds a constructor argument for OutputFormat.Hierarchical and OutputFormat.List to add a function to allow mapping of the ValidationMessage to an Object. This allows the message to be customized or allows the ValidationMessage to be passed through as is if the identity function is used.

codecov-commenter commented 2 months ago

Codecov Report

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

Project coverage is 79.18%. Comparing base (48ca3c2) to head (99d510a). Report is 10 commits behind head on master.

Files Patch % Lines
...va/com/networknt/schema/output/OutputUnitData.java 80.00% 1 Missing :warning:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1033 +/- ## ============================================ + Coverage 78.90% 79.18% +0.27% - Complexity 1965 1989 +24 ============================================ Files 172 174 +2 Lines 6352 6437 +85 Branches 1255 1261 +6 ============================================ + Hits 5012 5097 +85 + Misses 867 864 -3 - Partials 473 476 +3 ```

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