forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels-transliterate.tsp
More file actions
54 lines (44 loc) · 1.44 KB
/
models-transliterate.tsp
File metadata and controls
54 lines (44 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import "@typespec/rest";
import "@azure-tools/typespec-azure-core";
import "./models-shared.tsp";
using TypeSpec.Http;
using TypeSpec.Rest;
using Azure.Core;
namespace TextTranslation;
@doc("Request parameters for the transliterate API.")
model TransliterateParameters {
...CommonParameters;
@query
@doc("""
Specifies the language of the text to convert from one script to another.
Possible languages are listed in the transliteration scope obtained by querying the service
for its supported languages.
""")
language: string;
@query
@doc("""
Specifies the script used by the input text. Look up supported languages using the transliteration scope,
to find input scripts available for the selected language.
""")
fromScript: string;
@query
@doc("""
Specifies the output script. Look up supported languages using the transliteration scope, to find output
scripts available for the selected combination of input language and input script.
""")
toScript: string;
}
@doc("Response for the transliteration API.")
model TransliterateResult {
...CommonResultHeaders;
@bodyRoot
@doc("Array of transliterated texts")
result: TransliteratedText[];
}
@doc("Transliterated text element.")
model TransliteratedText {
@doc("A string which is the result of converting the input string to the output script.")
text: string;
@doc("A string specifying the script used in the output.")
script: string;
}