You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using iris and gRPC, if a struct contains a parent struct, the parent struct will be handled and parsed. To Reproduce
Steps to reproduce the behavior:
Hello @AliangCoder, this is expected, it's a good feature actually. All embedded structs and the controller struct it self are parsed as one request controller. This gives you the ability to make generic base controllers that can be used on any other controller. I don't know why is this a problem but if it makes your life harder, we could provide an option/setting to skip this feature.
Hello @AliangCoder, I am back with a solution for you. I've just pushed a commit to the master branch (go get github.com/kataras/iris/v12@master) which gives you two options to ignore embedded struct's methods:
Global
mvc.IgnoreEmbeddedControllers=true
Per Controller using mvc.IgnoreEmbedded option on .Handle method:
kataras
changed the title
[BUG]When using iris and gRPC, if a struct contains a parent struct, the parent struct will be handled and parsed.
[FEATURE] When using iris and gRPC, if a struct contains a parent struct, the parent struct will be handled and parsed.
Mar 19, 2023
Describe the bug
When using iris and gRPC, if a struct contains a parent struct, the parent struct will be handled and parsed.
To Reproduce
Steps to reproduce the behavior:
When I use it
BaseController
stdout
Expected behavior
A clear and concise description of what you expected to happen.
stdout should be
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
iris.Version
The text was updated successfully, but these errors were encountered: