From 31853a51ba26ce18ba4a99b569e9b278680c8110 Mon Sep 17 00:00:00 2001 From: frikky Date: Thu, 4 Jun 2020 04:07:06 +0200 Subject: [PATCH] #43: Fixed argument bug with paths --- backend/go-app/codegen.go | 2 +- frontend/src/AppCreator.js | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/backend/go-app/codegen.go b/backend/go-app/codegen.go index d1cf6ac0..e995afea 100644 --- a/backend/go-app/codegen.go +++ b/backend/go-app/codegen.go @@ -909,7 +909,7 @@ func handleGet(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wor } if param.Value.In == "path" { - //log.Printf("PATH!: %s", param.Value.Name) + log.Printf("PATH!: %s", param.Value.Name) parameters = append(parameters, param.Value.Name) //baseUrl = fmt.Sprintf("%s%s", baseUrl) } else if param.Value.In == "query" { diff --git a/frontend/src/AppCreator.js b/frontend/src/AppCreator.js index 29e98a56..7925246a 100644 --- a/frontend/src/AppCreator.js +++ b/frontend/src/AppCreator.js @@ -374,7 +374,6 @@ const AppCreator = (props) => { // FIXME: Have multiple authentication options? if (securitySchemes !== undefined) { - console.log("Am I in here?") for (const [key, value] of Object.entries(securitySchemes)) { if (value.scheme === "bearer") { setAuthenticationOption("Bearer auth") @@ -525,6 +524,8 @@ const AppCreator = (props) => { "parameters": [] } + console.log("ACTION: ", item) + if (item.queries.length > 0) { for (var querykey in item.queries) { const queryitem = item.queries[querykey] @@ -943,9 +944,7 @@ const AppCreator = (props) => { const setActionField = (field, value) => { currentAction[field] = value setCurrentAction(currentAction) - //if (updater !== value) { - // setUpdater(value) - //} + console.log("ACTION: ", currentAction) } const bodyInfo = actionBodyRequest.includes(currentActionMethod) ? @@ -1088,7 +1087,7 @@ const AppCreator = (props) => { } } - if (currentAction.paths !== paths) { + if (currentAction.paths !== paths && urlPath.length > 0) { setActionField("paths", paths) } @@ -1159,10 +1158,8 @@ const AppCreator = (props) => { }} onBlur={e => { // Fix basic issues in frontend. Python functions run a-zA-Z0-9_ - console.log(e.target.value) const regex = /[A-Za-z0-9 _]/g; const found = e.target.value.match(regex); - console.log("FOUND: ", found) if (found !== null) { setActionField("name", found.join("")) }