Fix Go path API version overrides - #5151
Open
Chenjie Shi (tadelesh) wants to merge 8 commits into
Open
Conversation
Store defaulted path API versions on generated clients so ClientOptions.APIVersion is applied while constructing request paths. Propagate the value and query/header policy metadata across sub-client hierarchies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a2fed377-7b26-45fc-b3aa-8b6d6df8b46a
Contributor
|
All changed packages have been documented.
Show changes
|
commit: |
Contributor
|
You can try these changes here
|
Chenjie Shi (tadelesh)
marked this pull request as draft
August 4, 2026 07:44
Store only the configured API version override on generated clients. Path request builders now retain their generated literal and replace it only when ClientOptions.APIVersion is non-empty, including ARM and hierarchical clients. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a2fed377-7b26-45fc-b3aa-8b6d6df8b46a
Normalize ARM options before reading APIVersion, keep literal API-version metadata on the constructable client, and restore the Azure path Spector request test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a2fed377-7b26-45fc-b3aa-8b6d6df8b46a
Assume a client uses one API-version location, select its first API-version parameter, and remove mixed-location scenario coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a2fed377-7b26-45fc-b3aa-8b6d6df8b46a
Keep existing client parameter collection unchanged and limit path override marking to the current constructable client. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a2fed377-7b26-45fc-b3aa-8b6d6df8b46a
Derive path API-version override support from existing client parameters, fully restore the adapter, codemodel, and versionedgroup test, and cover the override in the path-specific Spector test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a2fed377-7b26-45fc-b3aa-8b6d6df8b46a
Chenjie Shi (tadelesh)
marked this pull request as ready for review
August 5, 2026 10:01
Resolve the Go operations refactor by moving path API-version substitution into request-handler.ts and retaining constructor support in operations.ts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a2fed377-7b26-45fc-b3aa-8b6d6df8b46a
Contributor
📦 Package size report✅ No notable package size changes compared to the base branch. 13 package(s) with no notable change
Packed = gzipped |
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.
Summary
ClientOptions.APIVersionoverride a defaulted API version embedded in an operation pathoptions.APIVersionOverride algorithm
ClientOptions.APIVersioninto a privateapiVersionfield.This keeps generated literals as the source of default versions and avoids relying on azcore's path API-version policy, which intentionally does not rewrite URL paths.
Tests
versionedgroupretains its existing query API-version policy and its handwritten test remains unchangedCloses #4940