Fixed an app creation def issue

This commit is contained in:
frikky
2020-07-17 08:40:40 +02:00
parent cdfd2a52ae
commit 7d5761a2b1
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -398,6 +398,7 @@ func makePythoncode(swagger *openapi3.Swagger, name, url, method string, paramet
verifyAddin, verifyAddin,
) )
log.Printf("%s", data)
return functionname, data return functionname, data
} }
+6
View File
@@ -716,6 +716,11 @@ const AppCreator = (props) => {
} }
if (authenticationOption === "API key") { if (authenticationOption === "API key") {
if (parameterName.length === 0) {
alert.error("A field name for the APIkey must be defined")
return
}
data.components.securitySchemes["ApiKeyAuth"] = { data.components.securitySchemes["ApiKeyAuth"] = {
"type": "apiKey", "type": "apiKey",
"in": parameterLocation.toLowerCase(), "in": parameterLocation.toLowerCase(),
@@ -727,6 +732,7 @@ const AppCreator = (props) => {
"scheme": "bearer", "scheme": "bearer",
"bearerFormat": "UUID", "bearerFormat": "UUID",
} }
} else if (authenticationOption === "Basic auth") { } else if (authenticationOption === "Basic auth") {
data.components.securitySchemes["BasicAuth"] = { data.components.securitySchemes["BasicAuth"] = {
"type": "http", "type": "http",