这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions huma.go
Original file line number Diff line number Diff line change
Expand Up @@ -2039,8 +2039,14 @@ func convenience[I, O any](api API, method, path string, handler func(context.Co
Path: path,
Metadata: map[string]any{},
}
for _, oh := range operationHandlers {
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

}
} else {
for _, oh := range operationHandlers {
oh(&operation)
}
}
// If not modified, hint that these were auto-generated!
if operation.OperationID == opID {
Expand Down