Skip to content

Commit

Permalink
Query all secure bundles for Astra token
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-antoniak committed Jul 17, 2024
1 parent f23bf75 commit 3c85885
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion astra/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ func generateSecureBundleURLWithResponse(url, databaseID, token string, ctx cont
if err != nil {
return nil, err
}
res, err := client.GenerateSecureBundleURLWithResponse(ctx, databaseID, &astra.GenerateSecureBundleURLParams{})
// return all bundles, as returning only one causes issue with response deserializing
// client code generated by astra-client-go from Swagger definition does not support 'oneOf' clause
// used as a response of /v2/databases/{databaseID}/secureBundleURL endpoint
// (https://github.com/oapi-codegen/oapi-codegen/issues/1665)
returnAllBundles := true
res, err := client.GenerateSecureBundleURLWithResponse(ctx, databaseID, &astra.GenerateSecureBundleURLParams{All: &returnAllBundles})
if err != nil {
return nil, fmt.Errorf("error generating bundle urls: %v", err)
}
Expand Down

0 comments on commit 3c85885

Please sign in to comment.