-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Name middleware #583
Name middleware #583
Conversation
@benblack86 thanks! |
Updated |
src/openapi.validator.ts
Outdated
let inited = false; | ||
// install path params | ||
middlewares.push((req, res, next) => | ||
pContext | ||
middlewares.push(function PathParamsMiddleware(req, res, next) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more nit. use lower case camelCase
for the function names e.g. pathParamsMiddleware
. apologies for not being clear with my first comment
Updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
* Name middleware * Fix this * Add comment * Updates * Lowercase
For tracing, anonymous functions wouldn't show up with name. I've converted these anonymous functions to named functions so it is a little more clearer what is happening. Let me know if you think a different naming schema would be better.