Skip to content

openapi.yaml location with humaecho.NewWithGroup #889

@mrgleeco

Description

@mrgleeco

As preface, I'm n00b here and kudos are in order. Huma is really quite awesome.
So, I am a fan of echo and things work great until i use an echo group like so:

		e := echo.New()
		hc := huma.DefaultConfig(appName, appVersion)
		g := e.Group("/api/v0")
		app := humaecho.NewWithGroup(e, g, hc)

When I go to get the openAPI docs, curl localhost:8888/api/v0/docs it looks OK, but returns this content:

    <elements-api
      apiDescriptionUrl="/openapi.yaml"
      router="hash"
      layout="sidebar"
      tryItCredentialsPolicy="same-origin"
    />

Here is where the fail is: the YAML doc appears to be at /api/v0/openapi.yaml. Is there a magic setting to get things to realign? Id prefer to have the spec within my group prefix URI, but if not possible, is there a way to place at the root?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions