这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@fourcels
Copy link
Contributor

@fourcels fourcels commented May 8, 2025

	grp := huma.NewGroup(api, "/users")
	grp.UseSimpleModifier(func(o *huma.Operation) {
		o.Summary = "User Summary"
	})

	// Register the router here
	huma.Get(grp, "/current", h.GetCurrent, func(o *huma.Operation) {
		o.Summary = "Current User"
	})

@codecov
Copy link

codecov bot commented May 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.09%. Comparing base (eb497ee) to head (711c20c).
⚠️ Report is 61 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #819   +/-   ##
=======================================
  Coverage   93.08%   93.09%           
=======================================
  Files          23       23           
  Lines        5307     5312    +5     
=======================================
+ Hits         4940     4945    +5     
  Misses        314      314           
  Partials       53       53           

☔ View full report in Codecov by Sentry.
📢 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.

oh(&operation)
if grp, ok := api.(*Group); ok {
for _, oh := range operationHandlers {
grp.UseSimpleModifier(oh)
Copy link
Owner

@danielgtaylor danielgtaylor May 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this modify the group for all the other operations that may get registered on it as well? I'm not sure this is the correct behavior.

@fourcels what bug are you trying to fix with this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

router modifier should overrite group modifier

@fourcels fourcels closed this Jul 29, 2025
@fourcels fourcels deleted the fix-group-modifier branch July 29, 2025 02:22
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.

2 participants