json.json 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. [
  2. {
  3. "description": "Scalar members",
  4. "metadata": {
  5. "protocol": "json"
  6. },
  7. "shapes": {
  8. "OutputShape": {
  9. "type": "structure",
  10. "members": {
  11. "Str": {
  12. "shape": "StringType"
  13. },
  14. "Num": {
  15. "shape": "IntegerType"
  16. },
  17. "FalseBool": {
  18. "shape": "BooleanType"
  19. },
  20. "TrueBool": {
  21. "shape": "BooleanType"
  22. },
  23. "Float": {
  24. "shape": "FloatType"
  25. },
  26. "Double": {
  27. "shape": "DoubleType"
  28. },
  29. "Long": {
  30. "shape": "LongType"
  31. },
  32. "Char": {
  33. "shape": "CharType"
  34. }
  35. }
  36. },
  37. "StringType": {
  38. "type": "string"
  39. },
  40. "IntegerType": {
  41. "type": "integer"
  42. },
  43. "BooleanType": {
  44. "type": "boolean"
  45. },
  46. "FloatType": {
  47. "type": "float"
  48. },
  49. "DoubleType": {
  50. "type": "double"
  51. },
  52. "LongType": {
  53. "type": "long"
  54. },
  55. "CharType": {
  56. "type": "character"
  57. }
  58. },
  59. "cases": [
  60. {
  61. "given": {
  62. "output": {
  63. "shape": "OutputShape"
  64. },
  65. "name": "OperationName"
  66. },
  67. "result": {
  68. "Str": "myname",
  69. "Num": 123,
  70. "FalseBool": false,
  71. "TrueBool": true,
  72. "Float": 1.2,
  73. "Double": 1.3,
  74. "Long": 200,
  75. "Char": "a"
  76. },
  77. "response": {
  78. "status_code": 200,
  79. "headers": {},
  80. "body": "{\"Str\": \"myname\", \"Num\": 123, \"FalseBool\": false, \"TrueBool\": true, \"Float\": 1.2, \"Double\": 1.3, \"Long\": 200, \"Char\": \"a\"}"
  81. }
  82. }
  83. ]
  84. },
  85. {
  86. "description": "Blob members",
  87. "metadata": {
  88. "protocol": "json"
  89. },
  90. "shapes": {
  91. "OutputShape": {
  92. "type": "structure",
  93. "members": {
  94. "BlobMember": {
  95. "shape": "BlobType"
  96. },
  97. "StructMember": {
  98. "shape": "BlobContainer"
  99. }
  100. }
  101. },
  102. "BlobType": {
  103. "type": "blob"
  104. },
  105. "BlobContainer": {
  106. "type": "structure",
  107. "members": {
  108. "foo": {
  109. "shape": "BlobType"
  110. }
  111. }
  112. }
  113. },
  114. "cases": [
  115. {
  116. "given": {
  117. "output": {
  118. "shape": "OutputShape"
  119. },
  120. "name": "OperationName"
  121. },
  122. "result": {
  123. "BlobMember": "hi!",
  124. "StructMember": {
  125. "foo": "there!"
  126. }
  127. },
  128. "response": {
  129. "status_code": 200,
  130. "headers": {},
  131. "body": "{\"BlobMember\": \"aGkh\", \"StructMember\": {\"foo\": \"dGhlcmUh\"}}"
  132. }
  133. }
  134. ]
  135. },
  136. {
  137. "description": "Timestamp members",
  138. "metadata": {
  139. "protocol": "json"
  140. },
  141. "shapes": {
  142. "OutputShape": {
  143. "type": "structure",
  144. "members": {
  145. "TimeMember": {
  146. "shape": "TimeType"
  147. },
  148. "StructMember": {
  149. "shape": "TimeContainer"
  150. }
  151. }
  152. },
  153. "TimeType": {
  154. "type": "timestamp"
  155. },
  156. "TimeContainer": {
  157. "type": "structure",
  158. "members": {
  159. "foo": {
  160. "shape": "TimeType"
  161. }
  162. }
  163. }
  164. },
  165. "cases": [
  166. {
  167. "given": {
  168. "output": {
  169. "shape": "OutputShape"
  170. },
  171. "name": "OperationName"
  172. },
  173. "result": {
  174. "TimeMember": 1398796238,
  175. "StructMember": {
  176. "foo": 1398796238
  177. }
  178. },
  179. "response": {
  180. "status_code": 200,
  181. "headers": {},
  182. "body": "{\"TimeMember\": 1398796238, \"StructMember\": {\"foo\": 1398796238}}"
  183. }
  184. }
  185. ]
  186. },
  187. {
  188. "description": "Lists",
  189. "metadata": {
  190. "protocol": "json"
  191. },
  192. "shapes": {
  193. "OutputShape": {
  194. "type": "structure",
  195. "members": {
  196. "ListMember": {
  197. "shape": "ListType"
  198. },
  199. "ListMemberMap": {
  200. "shape": "ListTypeMap"
  201. },
  202. "ListMemberStruct": {
  203. "shape": "ListTypeStruct"
  204. }
  205. }
  206. },
  207. "ListType": {
  208. "type": "list",
  209. "member": {
  210. "shape": "StringType"
  211. }
  212. },
  213. "ListTypeMap": {
  214. "type": "list",
  215. "member": {
  216. "shape": "MapType"
  217. }
  218. },
  219. "ListTypeStruct": {
  220. "type": "list",
  221. "member": {
  222. "shape": "StructType"
  223. }
  224. },
  225. "StringType": {
  226. "type": "string"
  227. },
  228. "StructType": {
  229. "type": "structure",
  230. "members": {
  231. }
  232. },
  233. "MapType": {
  234. "type": "map",
  235. "key": { "shape": "StringType" },
  236. "value": { "shape": "StringType" }
  237. }
  238. },
  239. "cases": [
  240. {
  241. "given": {
  242. "output": {
  243. "shape": "OutputShape"
  244. },
  245. "name": "OperationName"
  246. },
  247. "result": {
  248. "ListMember": ["a", "b"]
  249. },
  250. "response": {
  251. "status_code": 200,
  252. "headers": {},
  253. "body": "{\"ListMember\": [\"a\", \"b\"]}"
  254. }
  255. },
  256. {
  257. "given": {
  258. "output": {
  259. "shape": "OutputShape"
  260. },
  261. "name": "OperationName"
  262. },
  263. "result": {
  264. "ListMember": ["a", null],
  265. "ListMemberMap": [{}, null, null, {}],
  266. "ListMemberStruct": [{}, null, null, {}]
  267. },
  268. "response": {
  269. "status_code": 200,
  270. "headers": {},
  271. "body": "{\"ListMember\": [\"a\", null], \"ListMemberMap\": [{}, null, null, {}], \"ListMemberStruct\": [{}, null, null, {}]}"
  272. }
  273. }
  274. ]
  275. },
  276. {
  277. "description": "Maps",
  278. "metadata": {
  279. "protocol": "json"
  280. },
  281. "shapes": {
  282. "OutputShape": {
  283. "type": "structure",
  284. "members": {
  285. "MapMember": {
  286. "shape": "MapType"
  287. }
  288. }
  289. },
  290. "MapType": {
  291. "type": "map",
  292. "key": {
  293. "shape": "StringType"
  294. },
  295. "value": {
  296. "shape": "NumberList"
  297. }
  298. },
  299. "StringType": {
  300. "type": "string"
  301. },
  302. "NumberList": {
  303. "type": "list",
  304. "member": {
  305. "shape": "IntegerType"
  306. }
  307. },
  308. "IntegerType": {
  309. "type": "integer"
  310. }
  311. },
  312. "cases": [
  313. {
  314. "given": {
  315. "output": {
  316. "shape": "OutputShape"
  317. },
  318. "name": "OperationName"
  319. },
  320. "result": {
  321. "MapMember": {
  322. "a": [1, 2],
  323. "b": [3, 4]
  324. }
  325. },
  326. "response": {
  327. "status_code": 200,
  328. "headers": {},
  329. "body": "{\"MapMember\": {\"a\": [1, 2], \"b\": [3, 4]}}"
  330. }
  331. }
  332. ]
  333. },
  334. {
  335. "description": "Ignores extra data",
  336. "metadata": {
  337. "protocol": "json"
  338. },
  339. "shapes": {
  340. "OutputShape": {
  341. "type": "structure",
  342. "members": {
  343. "StrType": {
  344. "shape": "StrType"
  345. }
  346. }
  347. },
  348. "StrType": {
  349. "type": "string"
  350. }
  351. },
  352. "cases": [
  353. {
  354. "given": {
  355. "output": {
  356. "shape": "OutputShape"
  357. },
  358. "name": "OperationName"
  359. },
  360. "result": {},
  361. "response": {
  362. "status_code": 200,
  363. "headers": {},
  364. "body": "{\"foo\": \"bar\"}"
  365. }
  366. }
  367. ]
  368. }
  369. ]