Skip to content

Commit

Permalink
Merge branch 'main' into filter-sql
Browse files Browse the repository at this point in the history
  • Loading branch information
theganyo authored Aug 21, 2023
2 parents d8d73a1 + 82fd89e commit 0b30674
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/visitor/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package visitor
import (
"context"
"fmt"
"strings"

"github.com/apigee/registry/cmd/registry/compress"
"github.com/apigee/registry/gapic"
Expand Down Expand Up @@ -132,7 +133,8 @@ func ListDeploymentRevisions(ctx context.Context,
filter string,
handler DeploymentHandler) error {
it := client.ListApiDeploymentRevisions(ctx, &rpc.ListApiDeploymentRevisionsRequest{
Name: name.String(),
// "@-" indicates a collection of revisions, but we only want to send the resource name to the List RPC.
Name: strings.TrimSuffix(name.String(), "@-"),
PageSize: pageSize,
Filter: filter,
})
Expand Down Expand Up @@ -234,7 +236,8 @@ func ListSpecRevisions(ctx context.Context,
getContents bool,
handler SpecHandler) error {
it := client.ListApiSpecRevisions(ctx, &rpc.ListApiSpecRevisionsRequest{
Name: name.String(),
// "@-" indicates a collection of revisions, but we only want to send the resource name to the List RPC.
Name: strings.TrimSuffix(name.String(), "@-"),
PageSize: pageSize,
Filter: filter,
})
Expand Down

0 comments on commit 0b30674

Please sign in to comment.