openapi-snippet
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -151,9 +151,13 @@ /** | ||
if (typeof param.in !== 'undefined' && param.in.toLowerCase() === 'query') { | ||
let value = 'SOME_' + (param.type || param.schema.type).toUpperCase() + '_VALUE' | ||
if (typeof values[param.name] !== 'undefined') { | ||
value = values[param.name] + '' /* adding a empty string to convert to string */ | ||
} else if (typeof param.default !== 'undefined') { | ||
value = param.default + '' | ||
} else if (typeof param.schema !== 'undefined' && typeof param.schema.example !== 'undefined') { | ||
value = param.schema.example + '' | ||
} | ||
queryStrings.push({ | ||
name: param.name, | ||
value: typeof values[param.name] === 'undefined' | ||
? (typeof param.default === 'undefined' | ||
? ('SOME_' + (param.type || param.schema.type).toUpperCase() + '_VALUE') | ||
: param.default + '') | ||
: (values[param.name] + '') /* adding a empty string to convert to string */ | ||
value: value | ||
}) | ||
@@ -256,3 +260,8 @@ } | ||
const authType = secDefinition.type.toLowerCase(); | ||
let authScheme = secDefinition.scheme.toLowerCase(); | ||
let authScheme = null; | ||
if(authType !== 'apikey'){ | ||
let authScheme = secDefinition.scheme.toLowerCase(); | ||
} | ||
switch (authType) { | ||
@@ -259,0 +268,0 @@ case 'http': |
{ | ||
"name": "openapi-snippet", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Generates code snippets from Open API (previously Swagger) documents.", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1192286
40608