krakenjs / swaggerize-express

Design-driven apis with swagger 2.0 and express.
Other
354 stars 81 forks source link

Multiple security requirements for an operation should be validated as a logical AND bw schemes #112

Open subeeshcbabu-zz opened 7 years ago

subeeshcbabu-zz commented 7 years ago

The code here returns passed = true, if at least one of the requirement passes.

async.some(Object.keys(security), passed, done);

This should be a logical AND instead of OR, as per the swagger spec 2.0. https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#security-requirement-object

Lists the required security schemes to execute this operation. The object can have multiple security schemes declared in it which are all required (that is, there is a logical AND between the schemes).