Skip to content

Documentation generation with new group feature #739

@bbedward

Description

@bbedward

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:

	// /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:

Image

And the openapi.yaml summary:

  /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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions