Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

allow actions to have an array of middleware which express calls before calling action #87

Closed
wants to merge 1 commit into from

Conversation

lefnire
Copy link
Contributor

@lefnire lefnire commented Jan 2, 2014

Don't know if this is something ya'll will support or merge, but I wanted to highlight it even so in case you have a recommended alternative solution. I often have multiple middleware functions in my Express routes (example). swagger-node-express handles the case of one common middleware being authentication, but not multiple. Of course, I could use async.waterfall in the action property - which I started to do, but which got unwieldy. This PR might be a decent/clean approach.

@Myztiq Myztiq mentioned this pull request Mar 17, 2014
@Myztiq
Copy link

Myztiq commented Mar 17, 2014

+1

1 similar comment
@ianmacl
Copy link

ianmacl commented Mar 18, 2014

+1

@@ -332,7 +332,11 @@ function resourceListing(req, res) {

// Adds a method to the api along with a spec. If the spec fails to validate, it won't be added

function addMethod(app, callback, spec) {
function addMethod(app, handler) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is going to cause backward compatibility problems so Wordnik might require you to bump the major version of the package. Alternatively, maybe we need to add a new method and deprecate this one.

@mgutz
Copy link

mgutz commented Jun 13, 2014

see #132

@ericrini
Copy link

+1

@fehguy
Copy link
Contributor

fehguy commented Jun 3, 2015

Closing as #207 will completely replace the implementation in this project.

@fehguy fehguy closed this Jun 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants