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

Feature add converter for user types #438

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ross96D
Copy link
Contributor

@ross96D ross96D commented May 11, 2024

fix #433

Copy link

codecov bot commented May 11, 2024

Codecov Report

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

Project coverage is 92.60%. Comparing base (e089398) to head (c2e4242).

Files Patch % Lines
huma.go 96.34% 6 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #438      +/-   ##
==========================================
- Coverage   92.76%   92.60%   -0.16%     
==========================================
  Files          21       21              
  Lines        3567     3599      +32     
==========================================
+ Hits         3309     3333      +24     
- Misses        220      226       +6     
- Partials       38       40       +2     

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

@danielgtaylor
Copy link
Owner

@ross96D thanks for the PR. I was looking into this one last night and wanted to give a brief update. I think you correctly identified a problem with custom param validation. I'm not sure a second method to convert from []byte is the best approach, so I'm thinking about what would be best for this feature. I thought about a custom Validate method but it wouldn't be used for body validation as that happens before the inputs are parsed into the struct values. 🤔 ... We could just return a value via some method so it can be used for validation. I'll try to propose something for this soon.

@victoraugustolls
Copy link
Sponsor Contributor

victoraugustolls commented May 15, 2024

Could we add docs for this?

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.

Allow custom query param types.
3 participants