Skip to content

Commit c11d9a1

Browse files
add protocol test models (clients+tests) to the repo
1 parent 863d76b commit c11d9a1

23 files changed

+45630
-0
lines changed

tools/code-generation/protocol-tests/api-descriptions/ec2-protocol-2020-01-08.normal.json

Lines changed: 960 additions & 0 deletions
Large diffs are not rendered by default.

tools/code-generation/protocol-tests/api-descriptions/json-protocol-2018-01-01.normal.json

Lines changed: 560 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 306 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,306 @@
1+
{
2+
"version":"2.0",
3+
"metadata":{
4+
"apiVersion":"2020-07-14",
5+
"auth":["aws.auth#sigv4"],
6+
"endpointPrefix":"jsonrpc10",
7+
"jsonVersion":"1.0",
8+
"protocol":"json",
9+
"protocols":["json"],
10+
"serviceFullName":"Sample Json 1.0 Protocol Service",
11+
"serviceId":"JSON RPC 10",
12+
"signatureVersion":"v4",
13+
"signingName":"jsonrpc10",
14+
"targetPrefix":"JsonRpc10",
15+
"uid":"json-rpc-10-2020-07-14"
16+
},
17+
"operations":{
18+
"ContentTypeParameters":{
19+
"name":"ContentTypeParameters",
20+
"http":{
21+
"method":"POST",
22+
"requestUri":"/"
23+
},
24+
"input":{"shape":"ContentTypeParametersInput"},
25+
"output":{"shape":"ContentTypeParametersOutput"},
26+
"documentation":"<p>The example tests how servers must support requests containing a <code>Content-Type</code> header with parameters.</p>"
27+
},
28+
"EmptyInputAndEmptyOutput":{
29+
"name":"EmptyInputAndEmptyOutput",
30+
"http":{
31+
"method":"POST",
32+
"requestUri":"/"
33+
},
34+
"input":{"shape":"EmptyInputAndEmptyOutputInput"},
35+
"output":{"shape":"EmptyInputAndEmptyOutputOutput"},
36+
"documentation":"<p>The example tests how requests and responses are serialized when there's no request or response payload because the operation has an empty input and empty output structure that reuses the same shape. While this should be rare, code generators must support this.</p>"
37+
},
38+
"EndpointOperation":{
39+
"name":"EndpointOperation",
40+
"http":{
41+
"method":"POST",
42+
"requestUri":"/"
43+
},
44+
"endpoint":{"hostPrefix":"foo."}
45+
},
46+
"EndpointWithHostLabelOperation":{
47+
"name":"EndpointWithHostLabelOperation",
48+
"http":{
49+
"method":"POST",
50+
"requestUri":"/"
51+
},
52+
"input":{"shape":"EndpointWithHostLabelOperationInput"},
53+
"endpoint":{
54+
"hostPrefix":"foo.{label}."
55+
}
56+
},
57+
"GreetingWithErrors":{
58+
"name":"GreetingWithErrors",
59+
"http":{
60+
"method":"POST",
61+
"requestUri":"/"
62+
},
63+
"input":{"shape":"GreetingWithErrorsInput"},
64+
"output":{"shape":"GreetingWithErrorsOutput"},
65+
"errors":[
66+
{"shape":"InvalidGreeting"},
67+
{"shape":"FooError"},
68+
{"shape":"ComplexError"}
69+
],
70+
"documentation":"<p>This operation has three possible return values:</p> <ol> <li>A successful response in the form of GreetingWithErrorsOutput</li> <li>An InvalidGreeting error.</li> <li>A ComplexError error.</li> </ol> <p>Implementations must be able to successfully take a response and properly deserialize successful and error responses.</p>",
71+
"idempotent":true
72+
},
73+
"HostWithPathOperation":{
74+
"name":"HostWithPathOperation",
75+
"http":{
76+
"method":"POST",
77+
"requestUri":"/"
78+
}
79+
},
80+
"JsonUnions":{
81+
"name":"JsonUnions",
82+
"http":{
83+
"method":"POST",
84+
"requestUri":"/"
85+
},
86+
"input":{"shape":"JsonUnionsInput"},
87+
"output":{"shape":"JsonUnionsOutput"},
88+
"documentation":"<p>This operation uses unions for inputs and outputs.</p>",
89+
"idempotent":true
90+
},
91+
"NoInputAndNoOutput":{
92+
"name":"NoInputAndNoOutput",
93+
"http":{
94+
"method":"POST",
95+
"requestUri":"/"
96+
},
97+
"documentation":"<p>The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input or output. While this should be rare, code generators must support this.</p>"
98+
},
99+
"NoInputAndOutput":{
100+
"name":"NoInputAndOutput",
101+
"http":{
102+
"method":"POST",
103+
"requestUri":"/"
104+
},
105+
"output":{"shape":"NoInputAndOutputOutput"},
106+
"documentation":"<p>The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input and the output is empty. While this should be rare, code generators must support this.</p>"
107+
},
108+
"PutWithContentEncoding":{
109+
"name":"PutWithContentEncoding",
110+
"http":{
111+
"method":"POST",
112+
"requestUri":"/"
113+
},
114+
"input":{"shape":"PutWithContentEncodingInput"},
115+
"requestcompression":{"encodings":["gzip"]}
116+
},
117+
"SimpleScalarProperties":{
118+
"name":"SimpleScalarProperties",
119+
"http":{
120+
"method":"POST",
121+
"requestUri":"/"
122+
},
123+
"input":{"shape":"SimpleScalarPropertiesInput"},
124+
"output":{"shape":"SimpleScalarPropertiesOutput"}
125+
}
126+
},
127+
"shapes":{
128+
"Blob":{"type":"blob"},
129+
"Boolean":{
130+
"type":"boolean",
131+
"box":true
132+
},
133+
"ComplexError":{
134+
"type":"structure",
135+
"members":{
136+
"TopLevel":{"shape":"String"},
137+
"Nested":{"shape":"ComplexNestedErrorData"}
138+
},
139+
"documentation":"<p>This error is thrown when a request is invalid.</p>",
140+
"exception":true
141+
},
142+
"ComplexNestedErrorData":{
143+
"type":"structure",
144+
"members":{
145+
"Foo":{"shape":"String"}
146+
}
147+
},
148+
"ContentTypeParametersInput":{
149+
"type":"structure",
150+
"members":{
151+
"value":{"shape":"Integer"}
152+
}
153+
},
154+
"ContentTypeParametersOutput":{
155+
"type":"structure",
156+
"members":{
157+
}
158+
},
159+
"Double":{
160+
"type":"double",
161+
"box":true
162+
},
163+
"EmptyInputAndEmptyOutputInput":{
164+
"type":"structure",
165+
"members":{
166+
}
167+
},
168+
"EmptyInputAndEmptyOutputOutput":{
169+
"type":"structure",
170+
"members":{
171+
}
172+
},
173+
"EndpointWithHostLabelOperationInput":{
174+
"type":"structure",
175+
"required":["label"],
176+
"members":{
177+
"label":{
178+
"shape":"String",
179+
"hostLabel":true
180+
}
181+
}
182+
},
183+
"Float":{
184+
"type":"float",
185+
"box":true
186+
},
187+
"FooEnum":{
188+
"type":"string",
189+
"enum":[
190+
"Foo",
191+
"Baz",
192+
"Bar",
193+
"1",
194+
"0"
195+
]
196+
},
197+
"FooError":{
198+
"type":"structure",
199+
"members":{
200+
},
201+
"documentation":"<p>This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.</p>",
202+
"exception":true,
203+
"fault":true
204+
},
205+
"GreetingStruct":{
206+
"type":"structure",
207+
"members":{
208+
"hi":{"shape":"String"}
209+
}
210+
},
211+
"GreetingWithErrorsInput":{
212+
"type":"structure",
213+
"members":{
214+
"greeting":{"shape":"String"}
215+
}
216+
},
217+
"GreetingWithErrorsOutput":{
218+
"type":"structure",
219+
"members":{
220+
"greeting":{"shape":"String"}
221+
}
222+
},
223+
"Integer":{
224+
"type":"integer",
225+
"box":true
226+
},
227+
"IntegerEnum":{
228+
"type":"integer",
229+
"box":true
230+
},
231+
"InvalidGreeting":{
232+
"type":"structure",
233+
"members":{
234+
"Message":{"shape":"String"}
235+
},
236+
"documentation":"<p>This error is thrown when an invalid greeting value is provided.</p>",
237+
"exception":true
238+
},
239+
"JsonUnionsInput":{
240+
"type":"structure",
241+
"members":{
242+
"contents":{"shape":"MyUnion"}
243+
}
244+
},
245+
"JsonUnionsOutput":{
246+
"type":"structure",
247+
"members":{
248+
"contents":{"shape":"MyUnion"}
249+
}
250+
},
251+
"MyUnion":{
252+
"type":"structure",
253+
"members":{
254+
"stringValue":{"shape":"String"},
255+
"booleanValue":{"shape":"Boolean"},
256+
"numberValue":{"shape":"Integer"},
257+
"blobValue":{"shape":"Blob"},
258+
"timestampValue":{"shape":"Timestamp"},
259+
"enumValue":{"shape":"FooEnum"},
260+
"intEnumValue":{"shape":"IntegerEnum"},
261+
"listValue":{"shape":"StringList"},
262+
"mapValue":{"shape":"StringMap"},
263+
"structureValue":{"shape":"GreetingStruct"}
264+
},
265+
"documentation":"<p>A union with a representative set of types for members.</p>",
266+
"union":true
267+
},
268+
"NoInputAndOutputOutput":{
269+
"type":"structure",
270+
"members":{
271+
}
272+
},
273+
"PutWithContentEncodingInput":{
274+
"type":"structure",
275+
"members":{
276+
"encoding":{"shape":"String"},
277+
"data":{"shape":"String"}
278+
}
279+
},
280+
"SimpleScalarPropertiesInput":{
281+
"type":"structure",
282+
"members":{
283+
"floatValue":{"shape":"Float"},
284+
"doubleValue":{"shape":"Double"}
285+
}
286+
},
287+
"SimpleScalarPropertiesOutput":{
288+
"type":"structure",
289+
"members":{
290+
"floatValue":{"shape":"Float"},
291+
"doubleValue":{"shape":"Double"}
292+
}
293+
},
294+
"String":{"type":"string"},
295+
"StringList":{
296+
"type":"list",
297+
"member":{"shape":"String"}
298+
},
299+
"StringMap":{
300+
"type":"map",
301+
"key":{"shape":"String"},
302+
"value":{"shape":"String"}
303+
},
304+
"Timestamp":{"type":"timestamp"}
305+
}
306+
}

0 commit comments

Comments
 (0)