Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
f8d346b
Update translate call to 2025-05-01
SG-MS Mar 22, 2025
604dc3b
Remove legacy api calls
SG-MS Mar 27, 2025
99a73b3
Remove legacy api calls
SG-MS Mar 27, 2025
2576025
Update version
SG-MS Mar 27, 2025
49e5a02
Update grade description
SG-MS Mar 27, 2025
0a29d40
Update typespec for translate call
SG-MS Mar 31, 2025
0412828
Update typespec for translate call
SG-MS Mar 31, 2025
f3ead02
update typespec for translate call - Fix Formatting
SG-MS Mar 31, 2025
7130eec
CHeckpoint on translate API update
SG-MS Apr 4, 2025
ef4a153
Add reference sentences into set
SG-MS Apr 7, 2025
0856135
Add reference sentences into set
SG-MS Apr 7, 2025
b435220
Several updates to spec
SG-MS Apr 9, 2025
d506548
sync new openapi.json
SG-MS Apr 10, 2025
f0b1cbf
sync new openapi.json
SG-MS Apr 10, 2025
1c5fcb9
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Apr 10, 2025
18d198e
Merge branch 'scgree/translation_2025-05-01' of https://github.com/Az…
SG-MS Apr 10, 2025
3ba9fc5
Fix examples and api
SG-MS Apr 10, 2025
3382918
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Apr 10, 2025
9c1262c
Fix examples and api
SG-MS Apr 10, 2025
058537a
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Apr 10, 2025
a3aeb82
Remove old files
SG-MS Apr 10, 2025
c4b531b
Remove old files
SG-MS Apr 10, 2025
8c4d3ff
FIx versioning
SG-MS Apr 10, 2025
20e3a7a
Fix examples in preview
SG-MS Apr 11, 2025
9a370c7
Fix examples in preview
SG-MS Apr 11, 2025
e8a1d7e
Fix examples in preview
SG-MS Apr 11, 2025
98a5368
Fix examples in preview
SG-MS Apr 11, 2025
429b89c
Fix examples in preview
SG-MS Apr 11, 2025
e06c129
Fix examples in preview
SG-MS Apr 11, 2025
114af2d
Fix examples
SG-MS Apr 11, 2025
d6e1af1
Removing defaults for tone and gender fields as per API design spec
zhangeugenia Apr 22, 2025
e3bc441
Update targets to an array value. Rename adaptiveDatasetIds to adapt…
SG-MS Apr 23, 2025
338c0b9
Adding missing go config in tspconfig.yaml
zhangeugenia Apr 24, 2025
b82e086
Recompiling typespec after changes
zhangeugenia Apr 24, 2025
41fde03
Fixing tspconfig for Document Translator as well (TSValidation CI is …
zhangeugenia Apr 24, 2025
393cfd7
Updating more misconfigs in Document Translator tspconfig
zhangeugenia Apr 24, 2025
3a909f6
More updates to DT tspconfig
zhangeugenia Apr 24, 2025
9b8f46a
More updates to DT tspconfig
zhangeugenia Apr 24, 2025
b166acd
More updates to Text tspconfig
zhangeugenia Apr 24, 2025
9af80e7
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Apr 24, 2025
9f4ca6c
Add back in compliant v3 API
SG-MS Apr 25, 2025
fa80c05
Add back in compliant v3 API
SG-MS Apr 25, 2025
da26ee3
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Apr 26, 2025
a9be2ab
Reduce parameters in 2025-05-1 version"
SG-MS Apr 29, 2025
5c42323
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Apr 29, 2025
0520c0d
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Apr 29, 2025
1931bfa
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Apr 30, 2025
00cb4a6
Fix whitespace issue
SG-MS Apr 30, 2025
49e9481
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Apr 30, 2025
e309853
Revert stable version number to v3.0
SG-MS Apr 30, 2025
fa5877f
Reverting version 3.0 to v3.0
SG-MS May 1, 2025
e11b7e2
Reverting version 3.0 to v3.0
SG-MS May 1, 2025
7f3aed6
Reverting version 3.0 to v3.0
SG-MS May 1, 2025
db2255e
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS May 1, 2025
b7cb9ba
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS May 2, 2025
c3830df
Merge branch 'scgree/translation_2025-05-01' of https://github.com/Az…
SG-MS May 2, 2025
5db7f79
Add GO SDK instructions
SG-MS May 2, 2025
6c1aed6
Add GO SDK instructions
SG-MS May 2, 2025
75b593c
Add GO SDK instructions
SG-MS May 2, 2025
9871d84
Add GO SDK instructions
SG-MS May 2, 2025
fd081bb
Remove readme/openapi instructions
SG-MS May 3, 2025
e7eca0a
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS May 5, 2025
6918686
TUrn off autorest again
SG-MS May 5, 2025
3ac2833
TUrn off autorest again
SG-MS May 5, 2025
e09521d
Remove readme/openapi instructions
SG-MS May 5, 2025
ac2533f
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS May 7, 2025
4604da2
Add autorest emitter
SG-MS May 7, 2025
886b567
Remove OpenAPI SDK generation
SG-MS May 8, 2025
6a8db16
Fix v3 api to remove breaking change
SG-MS May 9, 2025
e379194
Fix v3 api to remove breaking change
SG-MS May 9, 2025
4b3fc2f
Fix v3 api to remove breaking change
SG-MS May 9, 2025
cc132aa
Merge remote-tracking branch 'origin/main' into scgree/translation_20…
zhangeugenia May 9, 2025
9496736
Merge branch 'main' into scgree/translation_2025-05-01
zhangeugenia May 9, 2025
5f13e18
Unify v3 and 2025_05_01 body model
SG-MS May 9, 2025
f96839a
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS May 9, 2025
b6f4fa4
Merge branch 'scgree/translation_2025-05-01' of https://github.com/Az…
SG-MS May 9, 2025
8d42d2e
Unify v3 and 2025_05_01 body model
SG-MS May 9, 2025
37a0c42
Unify v3 and 2025_05_01 body model
SG-MS May 9, 2025
55f21c1
Unify v3 and 2025_05_01 body model
SG-MS May 9, 2025
2b52c5e
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS May 9, 2025
c858973
Fix examples
SG-MS May 9, 2025
34b8984
Fix examples
SG-MS May 9, 2025
3e96f49
Fix examples
SG-MS May 9, 2025
21306bb
Fix examples
SG-MS May 9, 2025
aee4378
Adding swagger-to-sdk block
zhangeugenia May 10, 2025
254455e
Merge branch 'scgree/translation_2025-05-01' of https://github.com/Az…
zhangeugenia May 10, 2025
3687c5c
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS May 12, 2025
2e821a7
Remove 3.0
SG-MS May 13, 2025
d550571
add 3.0
SG-MS May 13, 2025
7df1a1e
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS May 13, 2025
c49c8f3
Remove Go
SG-MS May 13, 2025
1b94ded
Remove go sdk
SG-MS May 13, 2025
5ce2342
More cleanup
SG-MS Jun 13, 2025
e444ec7
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Jun 13, 2025
daff86b
More cleanup
SG-MS Jun 13, 2025
05d8b8e
More cleanup
SG-MS Jun 13, 2025
00acf8e
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Jun 17, 2025
d639c1e
More cleanup
SG-MS Jun 17, 2025
94de425
More cleanup
SG-MS Jun 17, 2025
220f3e3
More cleanup
SG-MS Jun 17, 2025
da33b99
More cleanup
SG-MS Jun 17, 2025
7042a7b
More cleanup
SG-MS Jun 17, 2025
a1bd973
Merge branch 'main' into scgree/translation_2025-05-01
SG-MS Jun 17, 2025
155bfe8
More cleanup
SG-MS Jun 17, 2025
d245f50
More cleanup
SG-MS Jun 19, 2025
317d894
Fix versioning
SG-MS Jun 23, 2025
f1e6098
Fix versioning
SG-MS Jun 23, 2025
6ed1f84
Fix versioning
SG-MS Jun 23, 2025
f03cd9e
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Jun 23, 2025
4536615
Fix versioning
SG-MS Jun 23, 2025
b12210a
Fix versioning
SG-MS Jun 23, 2025
a15b88d
Fix 3.0 examples
SG-MS Jun 24, 2025
25ae60b
Fix 3.0 examples
SG-MS Jun 24, 2025
3793b26
Update target.language
SG-MS Jul 3, 2025
e966b79
Update target.language
SG-MS Jul 3, 2025
897ff05
Update target.language
SG-MS Jul 3, 2025
947fa8d
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
SG-MS Jul 10, 2025
ca41dcb
Remove SourceText. Rename DeploymentName
SG-MS Jul 11, 2025
1110e13
Remove SourceText. Rename DeploymentName
SG-MS Jul 11, 2025
53895f7
Remove SourceText. Rename DeploymentName
SG-MS Jul 11, 2025
e686741
Merge branch 'scgree/translation_2025-05-01' of https://github.com/Az…
SG-MS Jul 22, 2025
04159bf
updating comment
SG-MS Aug 22, 2025
2adf5d7
Remove deprecated @fixed decorators from typespec
SG-MS Aug 22, 2025
883f792
Remove deprecated @fixed decorators from typespec
SG-MS Aug 22, 2025
125017f
Remove deprecated @fixed decorators from typespec
SG-MS Aug 23, 2025
8bffd66
Change To into Language. Add SourceCharacters
SG-MS Aug 25, 2025
32c95f1
Update a couple more parameters.
SG-MS Aug 25, 2025
03f0513
Update a couple more parameters.
SG-MS Aug 26, 2025
6048c34
Update a couple more parameters.
SG-MS Aug 26, 2025
3ab620c
Remove readme.md for text translation
SG-MS Aug 27, 2025
4999a96
Merge branch 'main' into scgree/translation_2025-05-01
SG-MS Aug 27, 2025
ca61eee
Add readme.md back in
SG-MS Aug 27, 2025
dbbdc23
remove 3.0
SG-MS Aug 27, 2025
2a6eba3
merge main and resolve conflicts
qiaozha Sep 15, 2025
61a5f6d
Merge branch 'main' into scgree/translation_2025-05-01
jrjrguo Sep 15, 2025
f3eb122
update openapi.json ref in readme
Sep 16, 2025
7a763a5
unchange translation tspconfigs
Sep 16, 2025
4a60a2a
translation tspconfig format
Sep 16, 2025
f37f509
unremove transliteration
Sep 16, 2025
827ae87
keep v3 and v4 transliteration docs
Sep 16, 2025
6cbfdf0
Merge branch 'main' into scgree/translation_2025-05-01
mikeharder Sep 17, 2025
de36e6f
Merge branch 'main' into scgree/translation_2025-05-01
jrjrguo Sep 17, 2025
2bee36d
-sourceText +text
Sep 17, 2025
1f3e067
remove transliteration & source text in results
Sep 18, 2025
4139087
errorDetails code int32 -> string
Sep 22, 2025
27e15cb
translate result body updatet
Sep 22, 2025
ee78e68
transliterate response
Sep 22, 2025
823dad3
translate body
Sep 22, 2025
85f0869
transliterate request body
Sep 22, 2025
c9d47dc
update examples
Sep 22, 2025
9e8a276
rename response values -> value
Sep 23, 2025
92b6275
examples update values -> value
Sep 23, 2025
0817d5e
2025-05-01-preview -> 2025-10-01-preview
Oct 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"title": "Gets the set of languages currently supported by other operations of the Translator.",
"operationId": "GetSupportedLanguages",
"parameters": {
"X-ClientTraceId": "kayfnugjec",
"scope": "translation,transliteration,dictionary",
"Accept-Language": "en",
"If-None-Match": "fpnhruttllvc",
"api-version": "2025-10-01-preview"
},
"responses": {
"200": {
"body": {
"translation": {
"en": {
"name": "English",
"nativeName": "English",
"dir": "ltr"
},
"es": {
"name": "Spanish",
"nativeName": "Español",
"dir": "ltr"
}
},
"transliteration": {
"ar": {
"name": "Arabic",
"nativeName": "العربية",
"scripts": [
{
"code": "Arab",
"name": "Arabic",
"nativeName": "العربية",
"dir": "rtl",
"toScripts": [
{
"code": "Latn",
"name": "Latin",
"nativeName": "اللاتينية",
"dir": "ltr"
}
]
},
{
"code": "Latn",
"name": "Latin",
"nativeName": "اللاتينية",
"dir": "ltr",
"toScripts": [
{
"code": "Arab",
"name": "Arabic",
"nativeName": "العربية",
"dir": "rtl"
}
]
}
]
}
},
"dictionary": {
"cs": {
"name": "Czech",
"nativeName": "Čeština",
"dir": "ltr",
"translations": [
{
"name": "English",
"nativeName": "English",
"dir": "ltr",
"code": "en"
}
]
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"title": "Gets the set of languages currently supported by other operations of the Translator with minimum properties.",
"operationId": "GetSupportedLanguages",
"parameters": {
"api-version": "2025-10-01-preview"
},
"responses": {
"200": {
"body": {}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"title": "Translate Text",
"operationId": "Translate",
"parameters": {
"X-ClientTraceId": "ndbkaatzsnoetqkiehappoza",
"api-version": "2025-10-01-preview",
"body": {
"inputs": [
{
"text": "This is a test.",
"script": "Latn",
"language": "en",
"textType": "Plain",
"targets": [
{
"language": "cs",
"script": "Latn",
"profanityAction": "NoAction",
"profanityMarker": "Asterisk",
"deploymentName": "gpt-4o-mini",
"allowFallback": true,
"grade": "basic",
"tone": "formal",
"gender": "neutral",
"adaptiveDatasetId": "21000",
"referenceTextPairs": [
{
"source": "Please test this out.",
"target": "Vyzkoušejte si to."
}
]
}
]
}
]
}
},
"responses": {
"200": {
"body": {
"value": [
{
"detectedLanguage": {
"language": "en",
"score": 1.0
},
"translations": [
{
"language": "cs",
"instructionTokens": 302,
"sourceTokens": 5,
"responseTokens": 9,
"targetTokens": 5,
"text": "Toto je test."
}
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"title": "Translate Text with minimum properties",
"operationId": "Translate",
"parameters": {
"api-version": "2025-10-01-preview",
"body": {
"inputs": [
{
"text": "This is a test.",
"targets": [
{
"language": "cs"
}
]
}
]
}
},
"responses": {
"200": {
"body": {
"value": [
{
"detectedLanguage": {
"language": "en",
"score": 0.12345
},
"translations": [
{
"language": "cs",
"sourceCharacters": 15,
"text": "Tohle je test."
}
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"title": "Transliterate Text",
"operationId": "Transliterate",
"parameters": {
"X-ClientTraceId": "dzncrimwmvtwjnheh",
"language": "zh-Hans",
"fromScript": "Hans",
"toScript": "Latn",
"api-version": "2025-10-01-preview",
"body": {
"inputs": [
{
"text": "这是个测试。"
}
]
}
},
"responses": {
"200": {
"body": {
"value": [
{
"text": "zhè shì gè cè shì。",
"script": "Latn"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"title": "Transliterate Text with minimum properties",
"operationId": "Transliterate",
"parameters": {
"language": "zh-Hans",
"fromScript": "Hans",
"toScript": "Latn",
"api-version": "2025-10-01-preview",
"body": {
"inputs": [
{
"text": "这是个测试。"
}
]
}
},
"responses": {
"200": {
"body": {
"value": [
{
"text": "zhè shì gè cè shì。",
"script": "Latn"
}
]
}
}
}
}
9 changes: 3 additions & 6 deletions specification/translation/data-plane/TextTranslation/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "./routes.tsp";

using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
using TypeSpec.Versioning;

#suppress "@azure-tools/typespec-azure-core/auth-required" "!!FIXME!!"
Expand Down Expand Up @@ -35,10 +33,6 @@ using TypeSpec.Versioning;
Transliterate. Converts characters or letters of a source language to the corresponding characters or letters of a target language.

Detect. Returns the source code language code and a boolean variable denoting whether the detected language is supported for text translation and transliteration.

Dictionary lookup. Returns equivalent words for the source term in the target language.

Dictionary example Returns grammatical structure and context examples for the source term and target term pair.
""")
@versioned(APIVersion)
namespace TextTranslation;
Expand All @@ -47,4 +41,7 @@ namespace TextTranslation;
enum APIVersion {
@doc("Version 3.0")
v3_0: "3.0",

@doc("Version 2025-10-01")
v2025_10_01_preview: "2025-10-01-preview",
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import "./models-translate.tsp";

using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.Core;

namespace TextTranslation;

@doc("Request parameters for the break sentence API.")
@removed(APIVersion.v2025_10_01_preview)
model BreakSentenceParameters {
...CommonParameters;

Expand All @@ -29,6 +31,7 @@ model BreakSentenceParameters {
}

@doc("Response for the Break SEntence API.")
@removed(APIVersion.v2025_10_01_preview)
model BreakSentenceResult {
...CommonResultHeaders;

Expand All @@ -38,6 +41,7 @@ model BreakSentenceResult {
}

@doc("Item containing break sentence result.")
@removed(APIVersion.v2025_10_01_preview)
model BreakSentenceItem {
@doc("The detectedLanguage property is only present in the result object when language auto-detection is requested.")
detectedLanguage?: DetectedLanguage;
Expand Down
Loading
Loading