-
Notifications
You must be signed in to change notification settings - Fork 375
Add backcompat support for top parameter #9645
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
Merged
JoshLove-msft
merged 16 commits into
main
from
copilot/enable-backcompat-support-top-parameter-again
Feb 9, 2026
Merged
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2bdb568
Initial plan
Copilot 34df62c
Add backward compatibility support for top parameter conversion to ma…
Copilot 6856966
Address code review feedback: rename test for clarity
Copilot 928cb42
Fix test logic and preserve exact casing from LastContractView
Copilot 92e1576
Rename test for better clarity
Copilot 1309792
Document top parameter backward compatibility scenario
Copilot 9e29f22
Rename "Parameter Name Casing" section to "Parameter Naming"
Copilot 97ed0d5
Update test to validate top parameter backward compatibility with Las…
Copilot 56f29d3
Refactor parameter name correction methods to use a reusable helper
Copilot e3e5e12
Remove wrapper methods and call GetCorrectedParameterName directly
Copilot 3ce57ac
Consolidate paging parameter name corrections under single if block
Copilot ea80146
Make updatedName parameter non-nullable and remove null coalesce
Copilot e8da5a4
Move page size normalization logic inside parameter match check
Copilot 9811db0
clean up
JoshLove-msft 23e7b94
fix
JoshLove-msft 6326820
fix
JoshLove-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...estData/ListPageableTests/TopParameterPreservedWhenExistsInLastContractView/TestClient.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #nullable disable | ||
|
|
||
| using System.ClientModel; | ||
| using System.ClientModel.Primitives; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace Sample | ||
| { | ||
| public partial class TestClient | ||
| { | ||
| // This represents the previous contract with top parameter | ||
| public virtual Task<ClientResult> GetItemsAsync(int? top, CancellationToken cancellationToken = default) { return null; } | ||
| public virtual ClientResult GetItems(int? top, CancellationToken cancellationToken = default) { return null; } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.