Draft
Conversation
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com> Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/3fa4b56e-29b2-4b94-90bf-9625b1d9c81b
Copilot
AI
changed the title
[WIP] Fix autorest output sorting for x-ms-paths with query parameters
Fix x-ms-paths sorting for query-only paths
Mar 23, 2026
commit: |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
compareUrlin the JSON schema sorter fails to sort x-ms-paths entries starting with?(e.g.?a=1,?b=1). The function splits by/then calls.slice(1), which produces empty arrays for query-only paths, making them all compare as equal.Fix: Split path and query portions before segment comparison. When path segments are equal (including both empty for query-only paths), fall back to lexicographic comparison of the query string.
Original prompt
?#4064🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.