From 4c3460efeea25bdc841ed7274f01a7d819e4410a Mon Sep 17 00:00:00 2001 From: Ferdinand Prantl Date: Sun, 22 Nov 2015 15:25:57 +0100 Subject: [PATCH] Fix converting basicAuth athorization feom 1.2 to 2.0 schema version The basicAuth authentication type got lost. --- lib/spec-converter.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/spec-converter.js b/lib/spec-converter.js index 1933cb6ef..a4a72ff37 100644 --- a/lib/spec-converter.js +++ b/lib/spec-converter.js @@ -549,6 +549,10 @@ SwaggerSpecConverter.prototype.securityDefinitions = function(obj, swagger) { securityDefinition.name = definition.keyname || name; isValid = true; } + else if(definition.type === 'basicAuth') { + securityDefinition.type = 'basicAuth'; + isValid = true; + } else if(definition.type === 'oauth2') { var existingScopes = definition.scopes || []; var scopes = {};