Skip to content

Commit

Permalink
Fixed minor issues with Openapi3 mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
frikky committed Sep 4, 2023
1 parent 06b8018 commit 823361b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions db-connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -3259,6 +3259,12 @@ func GetOpenApiDatastore(ctx context.Context, id string) (ParsedOpenApi, error)
err := project.Dbclient.Get(ctx, key, api)
//if (err != nil || len(api.Body) == 0) && !strings.Contains(fmt.Sprintf("%s", err), "no such") {
if err != nil || len(api.Body) == 0 {
log.Printf("Some API issue: %s", err)

if strings.Contains(fmt.Sprintf("%s", err), "cannot load field") {
return *api, nil
}

//project.BucketName := project.BucketName
fullParsedPath := fmt.Sprintf("extra_specs/%s/openapi.json", id)
//gs://shuffler.appspot.com/extra_specs/0373ed696a3a2cba0a2b6838068f2b80
Expand Down
4 changes: 2 additions & 2 deletions shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -18599,7 +18599,7 @@ func HandleActionRecommendation(resp http.ResponseWriter, request *http.Request)
continue
}

log.Printf("Looking for category: %s", parsedCategory)
//log.Printf("Looking for category: %s", parsedCategory)
for category, categoryValue := range nodeRelations {
//log.Printf("Checking category %s vs %s", category, parsedCategory)
if category != parsedCategory {
Expand All @@ -18608,7 +18608,7 @@ func HandleActionRecommendation(resp http.ResponseWriter, request *http.Request)

// Choose first 2 outgoing nodes
for cnt, outgoing := range categoryValue.Outgoing {
log.Printf("Found outgoing %s:%d", outgoing.Name, outgoing.Count)
//log.Printf("Found outgoing %s:%d", outgoing.Name, outgoing.Count)
categoryname := outgoing.Name
if ArrayContains(skippable, categoryname) {
continue
Expand Down

0 comments on commit 823361b

Please sign in to comment.