You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
teamsGroup:=huma.NewGroup(api, "/teams")
teamsGroup.UseModifier(func(op*huma.Operation, nextfunc(*huma.Operation)) {
op.Tags= []string{"Teams"}
next(op)
})
teamHandlers:=teams_handler.NewHandlerGroup(srvImpl)
huma.Register(
teamsGroup,
huma.Operation{
OperationID: "list-teams",
Summary: "List Teams",
Description: "List all teams the current user is a member of",
Path: "/",
Method: http.MethodGet,
},
teamHandlers.ListTeams,
)
This generates a route like /teams/, but I would prefer it to generate the route /teams
Is this possible with any path syntax? When path is blank there is a panic at startup.
The text was updated successfully, but these errors were encountered:
teamsGroup:=huma.NewGroup(api, "/teams")
teamsGroup.UseModifier(func(op*huma.Operation, nextfunc(*huma.Operation)) {
op.Tags= []string{"Teams"}
// Trim any trailing `/` characters from the path before registration!op.Path=strings.TrimSuffix(op.Path, "/")
next(op)
})
I have a huma group like:
This generates a route like
/teams/
, but I would prefer it to generate the route/teams
Is this possible with any path syntax? When path is blank there is a panic at startup.
The text was updated successfully, but these errors were encountered: