Fixed bugs in appcreator
This commit is contained in:
@@ -553,7 +553,7 @@ func generateYaml(swagger *openapi3.Swagger, newmd5 string) (*openapi3.Swagger,
|
||||
})
|
||||
} else if securitySchemes["BasicAuth"] != nil {
|
||||
api.Authentication.Parameters = append(api.Authentication.Parameters, AuthenticationParams{
|
||||
Name: "username_auth",
|
||||
Name: "username_basic",
|
||||
Value: "",
|
||||
Example: "username",
|
||||
Description: securitySchemes["BasicAuth"].Value.Description,
|
||||
@@ -565,7 +565,7 @@ func generateYaml(swagger *openapi3.Swagger, newmd5 string) (*openapi3.Swagger,
|
||||
})
|
||||
|
||||
api.Authentication.Parameters = append(api.Authentication.Parameters, AuthenticationParams{
|
||||
Name: "password_auth",
|
||||
Name: "password_basic",
|
||||
Value: "",
|
||||
Example: "*****",
|
||||
Description: securitySchemes["BasicAuth"].Value.Description,
|
||||
|
||||
@@ -1843,7 +1843,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
|
||||
if !found && param.Required {
|
||||
log.Printf("Appaction %s with required param %s doesn't exist.", action.Name, param.Name)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Appaction %s with required param '%s' is empty."}`, action.Name, param.Name)))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user