diff --git a/backend/go-app/codegen.go b/backend/go-app/codegen.go index 90d5c6b3..0aa12fe4 100644 --- a/backend/go-app/codegen.go +++ b/backend/go-app/codegen.go @@ -398,6 +398,7 @@ func makePythoncode(swagger *openapi3.Swagger, name, url, method string, paramet verifyAddin, ) + log.Printf("%s", data) return functionname, data } diff --git a/frontend/src/AppCreator.js b/frontend/src/AppCreator.js index c44b7168..75182bf0 100644 --- a/frontend/src/AppCreator.js +++ b/frontend/src/AppCreator.js @@ -716,6 +716,11 @@ const AppCreator = (props) => { } if (authenticationOption === "API key") { + if (parameterName.length === 0) { + alert.error("A field name for the APIkey must be defined") + return + } + data.components.securitySchemes["ApiKeyAuth"] = { "type": "apiKey", "in": parameterLocation.toLowerCase(), @@ -727,6 +732,7 @@ const AppCreator = (props) => { "scheme": "bearer", "bearerFormat": "UUID", } + } else if (authenticationOption === "Basic auth") { data.components.securitySchemes["BasicAuth"] = { "type": "http",