huma
huma copied to clipboard
Does huma supports wildcard/greedy path parameters?
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 Does this help?
https://github.com/danielgtaylor/huma/discussions/432
@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