microsoft/azure-devops-go-api

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

vhvb1989 opened this issue · 0 comments

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