wcandillon / swagger-js-codegen

A Swagger Codegen for typescript, nodejs & angularjs
Apache License 2.0
693 stars 286 forks source link

the security validation on the operation was improved. #223

Open jomarquez21 opened 6 years ago

jomarquez21 commented 6 years ago

Problem

When security is present, even with empty content (like "security": []), the generator takes the operation as secured (which is wrong since there is no security definition) and makes the authentication mandatory in order to perform the request.

Solution

Evaluate each security definition to validate that the keys exist at securityDefinitions property, taking root's security as the default value.