-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Hi there, and first: thanks for this cool project! I am looking forward to using it with a large Echo app I have.
One issue I've found is that spec seems to require the struct tag path to indicate a path param in a route. Echo uses the struct tag param for this purpose, not path. I can work around it by adding both path and param struct tags.
e.g. After fixing the issue in #39 you'll note that the /api/vi/users/:id route doesn't actually bind the ID into the request struct. This can be fixed by adding param:"id" to GetUserRequest here. It's kind of annoying to duplicate this info.
Could we make the name of the struct tag used for path params configurable? Something like option.WithPathParamTag("param").
It's possible there are other struct tag mismatches, but I haven't gone deeper than this one yet.
(I hacked a fix locally that adds a path struct tag to any struct that only has param before handing it off to spec generation, but I'm not sure that's a great approach.)