Open TnTomato opened 10 months ago
First of all, I understand your thoughts and appreciate your feedback, but from a compatibility perspective and in the long run, this is not planned to be supported because this is go-zero's design and we will not change the original design to break compatible.
got it. I'll try figuring out a workaround. thanks for you reply.
Is your feature request related to a problem? Please describe. I'm designing APIs for a massive system depends on microservices. It's nice not to use any frameworks to ensure flexibility due to LESS IS MORE, but time limits, our team needs to finish our work in an extremely short time. So I choose go-zero as a framework and a tool as well. Learning from Google's API Improvement Proposals of Custom Methods, it provides a means for an API's vocabulary to adhere to user intent, which can make API definitions more flexible.
E.g.
But obviously, it conflits with the current path parameter definition. I hope this is considered in the road map.
Describe the solution you'd like Some solutions in my opinion:
Use
{}
to define path parametersEasy to implement but it's not forward-compatible.
Leave it as is
It's hard to deal with some edge cases.
Describe alternatives you've considered Provide an option to add some custom routes in routes.go.
Additional context I'm glad to offer help once I'm available.