Implement RejectUnknownQueryParameters (Fix #660)
Hello again!
This PR implements an opt-in config option to reject unknown query parameters (fixes #660).
I'm not confident that this is the best way to achieve this, and I'm not particularly a fan of adding an additional function to the API interface definition; however, I couldn't find a better way to achieve this given that this check needs to happen in the Register function which doesn't have access to api.config.
Codecov Report
:x: Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 92.53%. Comparing base (c7a8a79) to head (89a5125).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| huma.go | 93.10% | 1 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #925 +/- ##
=======================================
Coverage 92.53% 92.53%
=======================================
Files 23 23
Lines 4472 4504 +32
=======================================
+ Hits 4138 4168 +30
- Misses 275 276 +1
- Partials 59 60 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.