Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetPolicyConfigurations returns a continuationToken but it is not taking the token back in the request #156

Open
vhvb1989 opened this issue May 18, 2024 · 0 comments

Comments

@vhvb1989
Copy link

The api

GetPolicyConfigurations(ctx context.Context, args GetPolicyConfigurationsArgs) (*GetPolicyConfigurationsResponseValue, error)

returns the type GetPolicyConfigurationsResponseValue:

// Return type for the GetPolicyConfigurations function
type GetPolicyConfigurationsResponseValue struct {
	Value             []PolicyConfiguration
	ContinuationToken string
}

However, the args model GetPolicyConfigurationsArgs does not takes the token back:

type GetPolicyConfigurationsArgs struct {
	// (required) Project ID or project name
	Project *string
	// (optional) [Provided for legacy reasons] The scope on which a subset of policies is defined.
	Scope *string
	// (optional) Filter returned policies to only this type
	PolicyType *uuid.UUID
}

I can manually replicate the api in my application and implement the continuationToken, for now, but, ideally, can you fix this API to be similar to the other APIs that uses continuation token? And even better, if you can add the pager like: https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/azcore/runtime/pager.go#L44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant