huma icon indicating copy to clipboard operation
huma copied to clipboard

Does huma supports wildcard/greedy path parameters?

Open kgantsov opened this issue 4 months ago • 2 comments

Basically I want to have an endpoint that would look like /API/files/{path} so I can call it like curl localhost:8000/API/files/path/to/my/file.txt

I use it with fiber router and I know that fiber supports it (fiber docs):

// Wildcard - greedy - optional
app.Get("/user/*", func(c *fiber.Ctx) error {
    return c.SendString(c.Params("*"))
})

Any help in trying to find solution or a workaround would be appreciated

Thanks

kgantsov avatar Sep 26 '25 11:09 kgantsov

@kgantsov Does this help?

https://github.com/danielgtaylor/huma/discussions/432

sjayach avatar Nov 17 '25 15:11 sjayach

@sjayach thanks. It does work but the documentation seems to not support * +, so it sends * instead of the path when you click on Send API request button

Image

kgantsov avatar Dec 08 '25 12:12 kgantsov