danielgtaylor / danielgtaylor/huma
Documentation generation with new group feature
- Dominant language
- Go
- Stars
- 4.4k
- Forks
- 285
- Avg merge
- 40m
- Merged PRs (30d)
- 1
Description
Hi,
Love the framework - it is a huge time saver and a great project.
Groups was added in #728 , however it would be great if the documentation generated included the group path.
For example:
```go
// /auth group
authGrp := huma.NewGroup(api, "/auth")
huma.Get(authGrp, "/login", srvImpl.Login)
huma.Get(authGrp, "/callback", srvImpl.Callback)
// /user group
userGrp := huma.NewGroup(api, "/user")
userGrp.UseMiddleware(mw.Authenticate)
huma.Get(userGrp, "/me", srvImpl.Me)
```
I have a /auth group and a /user group
In the documentation/openapi generation the names are just "get login" "get callback" "get me" - it would be nice if the documentation would include the group path as well. So it would be "get auth login", "get user me", "get auth callback"
Screenshot shows what I'm referring to:
And the openapi.yaml summary:
```yaml
/user/me:
get:
operationId: get-me
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/MeResponseBody"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
summary: Get me
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.