Replies: 1 comment
-
If this is a middleware that is applied to all routes, you can use I'm not aware of a good solution for middleware that is only applied to some routes, not all. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I include a typedheader requirement in function parameters directly, it correctly shows up in docs.
However, I have some authorization middleware (included with
.layer(middleware::from_fn(...))
) that has a typedheader parameter, and it is not included in the relevant REST methods of the generated docs. I don't see an appropriate ApiRouter equivalentlayer
method to get that included -- am I missing something or is this not supported?Edit: I also tried using
.with_path_items
withsecurity_requirement
to work around this manually but I wasn't sure how to specify an Authorization header as the requirement there. I tried "ApiKey" per the example but since it's expecting an unstructured string I'm not sure what the format it.Beta Was this translation helpful? Give feedback.
All reactions