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

fix: better validation of manual schemas #196

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

danielgtaylor
Copy link
Owner

Manually created schemas were not having propertyNames and requiredMap set up, which meant that validation of the inputs for those manual schemas was incomplete. This fixes it by backfilling any pre-computed data during the PrecomputeMessages() call, ensuring the validation works as expected.

This is related to some more complex scenarios described in #185 where schemas can't be generated from structs.

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (57554dc) 93.41% compared to head (042c385) 93.44%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #196      +/-   ##
==========================================
+ Coverage   93.41%   93.44%   +0.02%     
==========================================
  Files          17       17              
  Lines        2172     2181       +9     
==========================================
+ Hits         2029     2038       +9     
  Misses        105      105              
  Partials       38       38              

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

@danielgtaylor danielgtaylor merged commit 4b5f0d1 into main Jan 3, 2024
5 checks passed
@danielgtaylor danielgtaylor deleted the fix-manual-prop-required branch January 3, 2024 05:59
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.

1 participant