-
-
Notifications
You must be signed in to change notification settings - Fork 214
feat: groups #728
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
feat: groups #728
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
docs/docs/features/middleware.md:204
- The phrase 'the API instance' should be corrected to 'list of middleware'.
- [`huma.Middlewares`](https://pkg.go.dev/github.com/danielgtaylor/huma/v2#Middlewares) the API instance
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #728 +/- ##
==========================================
+ Coverage 92.78% 93.00% +0.21%
==========================================
Files 22 23 +1
Lines 5062 5246 +184
==========================================
+ Hits 4697 4879 +182
- Misses 314 315 +1
- Partials 51 52 +1 ☔ View full report in Codecov by Sentry. |
This is exactly what we needed ! Thanks @danielgtaylor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- docs/docs/features/middleware.md: Evaluated as low risk
Comments suppressed due to low confidence (2)
group_test.go:143
- [nitpick] Using
assert.Panics
might not be the best way to handle errors. Consider adding more specific error handling tests to ensure proper error handling.
assert.Panics(t, func() { api.Get("/v1/users") })
group.go:23
- Ensure that the prefix is not an empty string before modifying the OperationID and Tags.
if len(prefixes) > 1 && prefix != "" {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR adds a new
Group
struct & feature that takes the functionality of the excellent https://github.com/cardinalby/hureg library and ports it into Huma's core. Basic functionality looks like this:Check out the included docs for more info!
Related to #719.
Fixes #489.