Skip to content

feat: pointer query params - #1110

Open
ImFlog wants to merge 3 commits into
danielgtaylor:mainfrom
ImFlog:feat/pointer-query-params
Open

ImFlog wants to merge 3 commits into
danielgtaylor:mainfrom
ImFlog:feat/pointer-query-params

Conversation

@ImFlog

@ImFlog ImFlog commented Aug 28, 2026

Copy link
Copy Markdown

Hello,

I started using this awesome project and was a bit annoyed by the need to declare additional structs instead of using pointer. I had a use case were a query parameters not passed has a different semantic than being false.

So I gave a Go at the issue. I am not an expert in reflection and thus was helped by AI doing the code.

The idea is to check if the reflection type is a pointer and if so, use the pointed object and store the fact that it's a pointer to be used later on.

It should fix #393.

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.36842% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.23%. Comparing base (ad801e0) to head (16471cf).

Files with missing lines Patch % Lines
huma.go 97.36% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1110      +/-   ##
==========================================
+ Coverage   93.20%   93.23%   +0.03%     
==========================================
  Files          23       23              
  Lines        4988     5011      +23     
==========================================
+ Hits         4649     4672      +23     
  Misses        272      272              
  Partials       67       67              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

How should nullable query params be handled without pointers?

1 participant