Open lirenhe opened 1 year ago
It is not codegen issue. Codgen generate the correct code according to the swagger definition. Need to update the swagger to surface those two paramters.
@chunyu3, do you know how the updated swagger would look like?
This is an issue with the code generation.
maxpagesize
is a standard Azure query parameter as described at https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#query-options. This should not be surfaced as a method parameter, but rather via Pageable<T>
's GetPages(pageSizeHint: 30)
method at https://learn.microsoft.com/en-us/dotnet/api/azure.pageable-1.aspages?view=azure-dotnet.
Current generated code:
public virtual Pageable(string testId, string continuationToken = null, RequestContext context = null);
public virtual Pageable (string orderby = null, string search = null, DateTimeOffset? lastModifiedStartTime = null, DateTimeOffset? lastModifiedEndTime = null, string continuationToken = null, int? maxpagesize = null, RequestContext context = null);
Based on the comments for archboard: https://apiview.dev/Assemblies/Review/4200a804f382479bb4d2bb4a3323b8c7
We need to config it to be part of Pageable similarly in second one maxpagesize is part of method, we also wanted it to part of Pageable.
Source Swagger: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/loadtestservice/data-plane/Microsoft.LoadTestService/stable/2022-11-01/loadtestservice.json