Hey, I have some express middleware I typically use with my express apps, for things like request and error logging. From tidbits I picked up in other issues, I've got it working by deactivating the error handler fitting and adding app.use() statements inside the callback passed in to SwaggerExpress.create().
However, I noticed that you had some experimental code in the bagpipes library that creates a connect-middleware fitting type. I'm interested in the idea of using existing middleware as a fitting, and messed around a bit, modifying index.js in this repo to add a connectMiddlewareDirs property to the pipesConfig object, and otherwise paralleling the logic that produces the value fed into the userFittingsDirs property of that same object.
Though I made some headway, I never got my middleware fully working as a fitting, but before continuing, I figured I should ask about your intentions with that experiment, and whether you think it a good idea to support such a thing over here.
Hey, I have some express middleware I typically use with my express apps, for things like request and error logging. From tidbits I picked up in other issues, I've got it working by deactivating the error handler fitting and adding
app.use()
statements inside the callback passed in toSwaggerExpress.create()
.However, I noticed that you had some experimental code in the bagpipes library that creates a
connect-middleware
fitting type. I'm interested in the idea of using existing middleware as a fitting, and messed around a bit, modifyingindex.js
in this repo to add aconnectMiddlewareDirs
property to thepipesConfig
object, and otherwise paralleling the logic that produces the value fed into theuserFittingsDirs
property of that same object.Though I made some headway, I never got my middleware fully working as a fitting, but before continuing, I figured I should ask about your intentions with that experiment, and whether you think it a good idea to support such a thing over here.