-
-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to access operation_id
in middleware?
#351
Comments
I'll add it tomorrow. |
When I thought about it, I found that this is not easy to achieve, the outer middleware cannot get the |
I see, I wonder if there is some way I can pass it in manually per route then into some middleware? Or get the function name of the handler instead? Currently I'm using the path but that is a breaking change compared to our previous warp based method. |
I've add an example to show how to get the https://github.com/poem-web/poem/tree/master/examples/openapi/log-with-operation-id |
omg you're such a legend, thanks so much for this, looks like it'll work great. I'll try it out soon, probably on the next poem-openapi release to crates.io, or maybe before that if I get time. Thanks again!! |
Used it here: aptos-labs/aptos-core#2781! Still testing but looks good! |
Hey, I have some logging middleware where I'd love to do log based on
operation_id
, but I don't know how I can access that data from middleware. I can't see anything onrequest
ornext
that lets me access this information about the endpoint.Thanks!
The text was updated successfully, but these errors were encountered: