Repository navigation
Proposal: Expose Middleware Information Through RouteInfo #4719
prajwalscodestack
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Gin already exposes route information through Engine.Routes(),
but RouteInfo currently contains only method, path and handler information.
In applications with nested route groups and middleware inheritance,
it can be difficult to determine which middleware are attached to a
specific route.
Would the maintainers be open to extending RouteInfo with middleware
information for debugging and route inspection purposes?
Example:
{
"method": "GET",
"path": "/api/v1/users",
"handler": "main.GetUsers",
"middlewares": [
"main.Auth",
"main.Logger"
]
}
I would be happy to investigate the implementation and submit a PR if
this aligns with Gin's goals.
All reactions