As part of 72a95c2, back compat support was added for service operations. There two bugs that were found as part of Azure/azure-sdk-for-net#59156
- If the previous version of the method had reserved param names
select, top, skip, etc we need to correctly generate the named argument.
In example:
/// <summary> Lists all indexes available for a search service. </summary>
/// <param name="select"> Selects which top-level properties to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. </param>
/// <param name="cancellationToken"> The cancellation token that can be used to cancel the operation. </param>
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual AsyncPageable<SearchIndexResponse> GetIndexesWithSelectedPropertiesAsync(IEnumerable<string> @select, CancellationToken cancellationToken)
{
return this.GetIndexesWithSelectedPropertiesAsync(select: default, top: default, skip: default, count: default, cancellationToken: cancellationToken);
}```
instead of:
```csharp
/// <summary> Lists all indexes available for a search service. </summary>
/// <param name="select"> Selects which top-level properties to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. </param>
/// <param name="cancellationToken"> The cancellation token that can be used to cancel the operation. </param>
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual AsyncPageable<SearchIndexResponse> GetIndexesWithSelectedPropertiesAsync(IEnumerable<string> @select, CancellationToken cancellationToken)
{
return this.GetIndexesWithSelectedPropertiesAsync($select: default, $top: default, $skip: default, $count: default, cancellationToken: cancellationToken);
}
- We should not generate methods that violate
Client method should have an optional CancellationToken called cancellationToken (both name and it being optional matters) or a RequestContext called context as the last parameter.. If the previous method had a cancellationToken param, it should be optional.
As part of 72a95c2, back compat support was added for service operations. There two bugs that were found as part of Azure/azure-sdk-for-net#59156
select,top,skip, etc we need to correctly generate the named argument.In example:
Client method should have an optional CancellationToken called cancellationToken (both name and it being optional matters) or a RequestContext called context as the last parameter.. If the previous method had a cancellationToken param, it should be optional.