Skip to content

Commit aa1f08c

Browse files
authored
[AI.TextTranslation] Disambiguate example titles (#24323)
- Causes error in TypeSpec 0.45.0 - Also change casing of textType in example to match spec - Fixes error ENUM_CASE_MISMATCH in Swagger ModelValidation
1 parent 084da0d commit aa1f08c

20 files changed

+359
-13
lines changed

specification/translation/Azure.AI.TextTranslation/examples/3.0/FindSentenceBoundaries_MinimumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"title": "Find Sentence Boundaries",
2+
"title": "Find Sentence Boundaries with minimum properties",
33
"operationId": "FindSentenceBoundaries",
44
"parameters": {
55
"api-version": "3.0",

specification/translation/Azure.AI.TextTranslation/examples/3.0/GetLanguages_MinimumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"title": "Gets the set of languages currently supported by other operations of the Translator.",
2+
"title": "Gets the set of languages currently supported by other operations of the Translator with minimum properties.",
33
"operationId": "GetLanguages",
44
"parameters": {
55
"api-version": "3.0"

specification/translation/Azure.AI.TextTranslation/examples/3.0/LookupDictionaryEntries_MinimumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"title": "Lookup Dictionary Entries",
2+
"title": "Lookup Dictionary Entries with minimum properties",
33
"operationId": "LookupDictionaryEntries",
44
"parameters": {
55
"from": "en",

specification/translation/Azure.AI.TextTranslation/examples/3.0/LookupDictionaryExamples_MinimumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"title": "Lookup Dictionary Examples",
2+
"title": "Lookup Dictionary Examples with minimum properties",
33
"operationId": "LookupDictionaryExamples",
44
"parameters": {
55
"from": "en",

specification/translation/Azure.AI.TextTranslation/examples/3.0/Translate_MaximumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"cs"
88
],
99
"from": "en",
10-
"textType": "plain",
10+
"textType": "Plain",
1111
"category": "custom",
1212
"profanityAction": "NoAction",
1313
"profanityMarker": "Asterisk",

specification/translation/Azure.AI.TextTranslation/examples/3.0/Translate_MinimumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"title": "Translate Text",
2+
"title": "Translate Text with minimum properties",
33
"operationId": "Translate",
44
"parameters": {
55
"to": [

specification/translation/Azure.AI.TextTranslation/examples/3.0/Transliterate_MinimumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"title": "Transliterate Text",
2+
"title": "Transliterate Text with minimum properties",
33
"operationId": "Transliterate",
44
"parameters": {
55
"language": "zh-Hans",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"title": "Find Sentence Boundaries",
3+
"operationId": "FindSentenceBoundaries",
4+
"parameters": {
5+
"X-ClientTraceId": "svun",
6+
"language": "en",
7+
"script": "Latn",
8+
"api-version": "3.0",
9+
"requestBody": [
10+
{
11+
"text": "How are you? I am fine. What did you do today?"
12+
}
13+
]
14+
},
15+
"responses": {
16+
"200": {
17+
"body": [
18+
{
19+
"sentLen": [
20+
13,
21+
11,
22+
22
23+
]
24+
}
25+
]
26+
}
27+
}
28+
}

specification/translation/data-plane/Azure.AI.TextTranslation/stable/v3.0/examples/FindSentenceBoundaries_MinimumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"title": "Find Sentence Boundaries",
2+
"title": "Find Sentence Boundaries with minimum properties",
33
"operationId": "FindSentenceBoundaries",
44
"parameters": {
55
"api-version": "3.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"title": "Gets the set of languages currently supported by other operations of the Translator.",
3+
"operationId": "GetLanguages",
4+
"parameters": {
5+
"X-ClientTraceId": "kayfnugjec",
6+
"scope": "translation,transliteration,dictionary",
7+
"Accept-Language": "en",
8+
"If-None-Match": "fpnhruttllvc",
9+
"api-version": "3.0"
10+
},
11+
"responses": {
12+
"200": {
13+
"body": {
14+
"translation": {
15+
"en": {
16+
"name": "English",
17+
"nativeName": "English",
18+
"dir": "ltr"
19+
},
20+
"es": {
21+
"name": "Spanish",
22+
"nativeName": "Español",
23+
"dir": "ltr"
24+
}
25+
},
26+
"transliteration": {
27+
"ar": {
28+
"name": "Arabic",
29+
"nativeName": "العربية",
30+
"scripts": [
31+
{
32+
"code": "Arab",
33+
"name": "Arabic",
34+
"nativeName": "العربية",
35+
"dir": "rtl",
36+
"toScripts": [
37+
{
38+
"code": "Latn",
39+
"name": "Latin",
40+
"nativeName": "اللاتينية",
41+
"dir": "ltr"
42+
}
43+
]
44+
},
45+
{
46+
"code": "Latn",
47+
"name": "Latin",
48+
"nativeName": "اللاتينية",
49+
"dir": "ltr",
50+
"toScripts": [
51+
{
52+
"code": "Arab",
53+
"name": "Arabic",
54+
"nativeName": "العربية",
55+
"dir": "rtl"
56+
}
57+
]
58+
}
59+
]
60+
}
61+
},
62+
"dictionary": {
63+
"cs": {
64+
"name": "Czech",
65+
"nativeName": "Čeština",
66+
"dir": "ltr",
67+
"translations": [
68+
{
69+
"name": "English",
70+
"nativeName": "English",
71+
"dir": "ltr",
72+
"code": "en"
73+
}
74+
]
75+
}
76+
}
77+
}
78+
}
79+
}
80+
}

0 commit comments

Comments
 (0)