Fixed openapi3 config download bugs

This commit is contained in:
frikky
2020-06-01 15:57:06 +02:00
parent acb4b3da8c
commit e11d58c239
6 changed files with 97 additions and 60 deletions
+5 -3
View File
@@ -5528,7 +5528,7 @@ func verifySwagger(resp http.ResponseWriter, request *http.Request) {
}
//log.Printf("Should generate yaml")
api, pythonfunctions, err := generateYaml(swagger, newmd5)
swagger, api, pythonfunctions, err := generateYaml(swagger, newmd5)
if err != nil {
log.Printf("Failed building and generating yaml: %s", err)
resp.WriteHeader(500)
@@ -5536,8 +5536,7 @@ func verifySwagger(resp http.ResponseWriter, request *http.Request) {
return
}
log.Printf("PATHS: %#v", swagger.Paths["/comments/put"])
log.Printf("Functions: %d", len(swagger.Paths))
log.Printf("Functions: %d", swagger.Paths)
log.Printf("Actions: %d", len(api.Actions))
api.Owner = user.Id
@@ -5694,6 +5693,9 @@ func verifySwagger(resp http.ResponseWriter, request *http.Request) {
resp.Write([]byte(fmt.Sprintf(`{"success": true, "reason": "%"}`, err)))
}
// Backup every single one
setOpenApiDatastore(ctx, api.ID, parsed)
err = increaseStatisticsField(ctx, "total_apps_created", newmd5, 1)
if err != nil {
log.Printf("Failed to increase success execution stats: %s", err)