Skip to content

[Translation] Regenerate Azure.AI.Translation.Document from 2026-03-01 spec#60219

Open
jrjrguo wants to merge 3 commits into
Azure:mainfrom
jrjrguo:translation/document-2026-03-01-regen
Open

[Translation] Regenerate Azure.AI.Translation.Document from 2026-03-01 spec#60219
jrjrguo wants to merge 3 commits into
Azure:mainfrom
jrjrguo:translation/document-2026-03-01-regen

Conversation

@jrjrguo

@jrjrguo jrjrguo commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary

Regenerates Azure.AI.Translation.Document from the latest Document Translation API spec (2026-03-01) and reconciles the SDK customizations to build cleanly against the new generated surface. Prepares the 3.0.0 release.

Regenerated from azure-rest-api-specs commit 1e6bbad15be9637f81306ce9ea62db9e3523702c.

API changes (spec 2026-03-01)

  • New stable service API version 2026-03-01 is now the default. The 2024-11-01-preview and 2025-12-01-preview preview versions were removed from DocumentTranslationClientOptions.ServiceVersion.
  • New DeploymentName property on input TranslationTarget and output DocumentStatusResult.
  • New deploymentName parameter on the single-document Translate / TranslateAsync operations.

Customization / build fixes

  • DocumentTranslationClientOptions.cs: updated the ServiceVersion → api-version mapping for V2026_03_01.
  • SingleDocumentTranslationClient.cs: added deploymentName to the stable hand-written Translate/TranslateAsync convenience overloads, fixed delegating calls for the new protocol signature, and suppressed the generator's new [Experimental] multipart convenience duplicates.
  • DocumentTranslationModelFactory.cs: updated the DocumentStatusResult [CodeGenSuppress] signature for the new deploymentName parameter, avoiding an AZC0014 JsonElement leak.
  • Regenerated the public API listings (api/*.cs).
  • Filled in the 3.0.0 CHANGELOG entry.

Validation

  • src and tests build clean (Release).
  • All 88 non-live tests pass on net462 / net8.0 / net9.0 / net10.0 (6 live tests skipped).

Follow-ups (not in this PR)

  • ApiCompat review for the 3.0.0 major bump (breaking changes are intentional).
  • Live test coverage + recordings for deploymentName and the new api-version.
  • Optional samples demonstrating deploymentName.

Jiarui Guo added 2 commits June 24, 2026 15:48
Regenerated from azure-rest-api-specs commit 1e6bbad15be9637f81306ce9ea62db9e3523702c (DocumentTranslation 2026-03-01). Includes new deploymentName support and updated ServiceVersion. Build fixes for customization drift to follow.
- Update ServiceVersion mapping in DocumentTranslationClientOptions to 2026-03-01
- Add deploymentName to hand-written single-document Translate convenience overloads and suppress the generated experimental duplicates
- Update DocumentStatusResult model-factory CodeGenSuppress signature for new deploymentName param
- Regenerate public API listings
- Fill in 3.0.0 changelog
Copilot AI review requested due to automatic review settings June 24, 2026 23:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Regenerates Azure.AI.Translation.Document against the 2026-03-01 Document Translation REST API spec, updates the SDK’s custom convenience layer to match the new protocol surface, and prepares the library for the 3.0.0 release.

Changes:

  • Updates the default service API version to 2026-03-01 and removes preview service versions from DocumentTranslationClientOptions.ServiceVersion.
  • Adds support for deploymentName across the single-document translate convenience APIs and the generated protocol request pipeline.
  • Adds DeploymentName to the relevant models (TranslationTarget, DocumentStatusResult), updates public API listings, package metadata, and changelog/versioning.

Reviewed changes

Copilot reviewed 10 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/translation/Azure.AI.Translation.Document/tsp-location.yaml Bumps the spec repo commit used for regeneration.
sdk/translation/Azure.AI.Translation.Document/src/SingleDocumentTranslationClient.cs Updates handwritten convenience overloads to include deploymentName and suppresses generated duplicates.
sdk/translation/Azure.AI.Translation.Document/src/Generated/SingleDocumentTranslationClient.RestClient.cs Adds deploymentName as a query parameter to the translate request.
sdk/translation/Azure.AI.Translation.Document/src/Generated/SingleDocumentTranslationClient.cs Updates protocol method signatures to accept deploymentName and wires it into request creation.
sdk/translation/Azure.AI.Translation.Document/src/Generated/Models/TranslationTarget.Serialization.cs Serializes/deserializes deploymentName on TranslationTarget.
sdk/translation/Azure.AI.Translation.Document/src/Generated/Models/TranslationTarget.cs Adds TranslationTarget.DeploymentName.
sdk/translation/Azure.AI.Translation.Document/src/Generated/Models/DocumentStatusResult.Serialization.cs Serializes/deserializes deploymentName on DocumentStatusResult.
sdk/translation/Azure.AI.Translation.Document/src/Generated/Models/DocumentStatusResult.cs Adds DocumentStatusResult.DeploymentName.
sdk/translation/Azure.AI.Translation.Document/src/Generated/DocumentTranslationModelFactory.cs Updates TranslationTarget factory overloads to include deploymentName and retains a hidden compatibility overload.
sdk/translation/Azure.AI.Translation.Document/src/Generated/DocumentTranslationClientOptions.cs Updates generated defaults/enum to V2026_03_01 and 2026-03-01.
sdk/translation/Azure.AI.Translation.Document/src/DocumentTranslationModelFactory.cs Updates [CodeGenSuppress] signature for DocumentStatusResult to include the new deploymentName parameter.
sdk/translation/Azure.AI.Translation.Document/src/DocumentTranslationClientOptions.cs Updates ServiceVersion→api-version mapping to include only stable V2026_03_01 (plus V2024_05_01).
sdk/translation/Azure.AI.Translation.Document/src/Azure.AI.Translation.Document.csproj Sets package version to 3.0.0.
sdk/translation/Azure.AI.Translation.Document/metadata.json Updates recorded service apiVersion to 2026-03-01.
sdk/translation/Azure.AI.Translation.Document/CHANGELOG.md Adds 3.0.0 changelog entry documenting additions and breaking changes.
sdk/translation/Azure.AI.Translation.Document/api/Azure.AI.Translation.Document.netstandard2.0.cs Updates public API baseline for new model members and updated overloads/options.
sdk/translation/Azure.AI.Translation.Document/api/Azure.AI.Translation.Document.net8.0.cs Updates public API baseline for new model members and updated overloads/options.
sdk/translation/Azure.AI.Translation.Document/api/Azure.AI.Translation.Document.net10.0.cs Updates public API baseline for new model members and updated overloads/options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants