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: support fields with ,omitempty but no name #341

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

danielgtaylor
Copy link
Owner

Based on a comment by @lazharichir this was an annoying bug where json:",omitempty" resulted in blank names in Huma-generated schemas. This is actually allowed by the standard library and means to just re-used the field name, so Huma now follows that same logic.

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.29%. Comparing base (f160410) to head (2964069).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #341   +/-   ##
=======================================
  Coverage   95.29%   95.29%           
=======================================
  Files          19       19           
  Lines        2827     2828    +1     
=======================================
+ Hits         2694     2695    +1     
  Misses         97       97           
  Partials       36       36           

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

@danielgtaylor danielgtaylor merged commit bd81d8b into main Mar 28, 2024
5 checks passed
@danielgtaylor danielgtaylor deleted the fix-no-name-omitempty branch March 28, 2024 15:33
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