handled paging parameter casing#9567
Conversation
|
No changes needing a change description found. |
jorgerangel-msft
left a comment
There was a problem hiding this comment.
Could we also make sure to run the regen preview script?
...sharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/RestClientProvider.cs
Outdated
Show resolved
Hide resolved
...sharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/RestClientProvider.cs
Show resolved
Hide resolved
...TypeSpec.Generator.ClientModel/test/Providers/RestClientProviders/RestClientProviderTests.cs
Show resolved
Hide resolved
@jorgerangel-msft I do see changes when we run regen preview the changes are that the Client now has camelCased maxPageSize Parameter. |
As long as these changes are expected, then it should be okay. For the libraries that haven't GA'd I'm assuming we are "fixing" the parameter to be |
Exactly!!! The casing only applies if paging parameter is "maxpageszie" and the library is not GA'd |
Can we update this file with this scenario - https://github.com/microsoft/typespec/blob/main/packages/http-client-csharp/generator/docs/backward-compatibility.md |
This pull request improves the handling of page size parameter names in the C# HTTP client generator to ensure correct casing and compatibility with previous contract versions. The changes introduce logic to preserve parameter casing from the previous contract when available and to normalize common variants (like "maxpagesize") to the standard "maxPageSize" otherwise. Comprehensive tests are added to verify this behavior.
Resolves: Azure/azure-sdk-for-net#54468