-
Notifications
You must be signed in to change notification settings - Fork 610
/
Copy pathecho.smithy
58 lines (48 loc) · 892 Bytes
/
echo.smithy
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
55
56
57
58
$version: "1.0"
namespace aws.test.generic
use aws.protocols#restJson1
@restJson1
service EchoService {
version: "2018-05-10"
operations: [
Echo
Length
]
}
@http(code: 200, method: "POST", uri: "/echo")
operation Echo {
input: EchoInput
output: EchoOutput
errors: [
PalindromeException
]
}
@readonly
@http(code: 200, method: "GET", uri: "/length/{string}")
operation Length {
input: LengthInput
output: LengthOutput
errors: [
PalindromeException
]
}
structure EchoInput {
string: String
}
structure EchoOutput {
string: String
}
structure LengthInput {
@required
@httpLabel
string: String
}
structure LengthOutput {
length: Integer
}
/// For some reason, this service does not like palindromes!
@httpError(400)
@error("client")
structure PalindromeException {
message: String
}