You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that the OAS 3.0.x specification moved the securityDefinitions member of the req.swagger.swaggerObject to req.swagger.swaggerObject.components.securitySchemas but it seems like the code in swagger-security.js was not updated to reflect this.
Just curious how this is still a lingering issue, does anyone else use security in their OAS projects?
Here is the fix to go in place of swagger-security.js:138-140
varsecDef;if(req.swagger.swaggerVersion<"2.0"){// Swagger pre 2.0secDef=req.swagger.resourceListing.authorizations[name];}elseif(req.swagger.swaggerVersion<"3.0"){// Swagger 2.0 up to OAS 3.0secDef=req.swagger.swaggerObject.securityDefinitions[name];}else{// OAS 3.0+secDef=req.swagger.swaggerObject.components.securitySchemes[name];}
The text was updated successfully, but these errors were encountered:
The problem is that the OAS 3.0.x specification moved the
securityDefinitions
member of thereq.swagger.swaggerObject
toreq.swagger.swaggerObject.components.securitySchemas
but it seems like the code inswagger-security.js
was not updated to reflect this.Just curious how this is still a lingering issue, does anyone else use security in their OAS projects?
Here is the fix to go in place of
swagger-security.js:138-140
The text was updated successfully, but these errors were encountered: