Move legacy API version override to Azure Core - #5176
Move legacy API version override to Azure Core#5176Mark Cowlishaw (markcowl) wants to merge 6 commits into
Conversation
|
All changed packages have been documented.
Show changes
|
|
You can try these changes here
|
@azure-tools/typespec-autorest
@azure-tools/typespec-azure-core
@azure-tools/typespec-azure-resource-manager
@azure-tools/typespec-client-generator-core
@azure-tools/typespec-go
@azure-tools/typespec-ts
commit: |
c964531 to
c6b6218
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f21ed198-f6d8-4a45-ab56-25dbec549540
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f21ed198-f6d8-4a45-ab56-25dbec549540
Validate root-client API version overrides while constructing the SDK package so TypeSpec validation does not eagerly build the client graph or duplicate unrelated diagnostics. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f21ed198-f6d8-4a45-ab56-25dbec549540
Keep client override validation in the TypeSpec validation hook, but determine explicit client ancestry directly from scoped decorator state so validation does not emit SDK graph diagnostics early or twice. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f21ed198-f6d8-4a45-ab56-25dbec549540
Add Azure.Core.Legacy.overrideApiVersion with inherited accessors and update TCGC and downstream emitters to consume the Azure Core metadata while preserving per-client opaque API-version defaults. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f21ed198-f6d8-4a45-ab56-25dbec549540
Document Azure.Core.Legacy.overrideApiVersion in the generated Azure Core decorator reference and index. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f21ed198-f6d8-4a45-ab56-25dbec549540
c6b6218 to
54a2526
Compare
📦 Package size report8 packages changed size compared to the base branch.
37 unchanged package(s)
Packed = gzipped |
| export function getApiVersionOverride( | ||
| program: Program, | ||
| target: Namespace | Interface, | ||
| emitterName?: string, |
There was a problem hiding this comment.
No Azure Core decorators have scope. Shall we remove the emitterName?
There was a problem hiding this comment.
You do not need to add new param in TCGC. Just change the logic inner updateWithApiVersionInformation and all emitters could get transparent value for this.
Summary
Validation