json.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. [
  2. {
  3. "description": "Scalar members",
  4. "metadata": {
  5. "protocol": "json",
  6. "jsonVersion": "1.1",
  7. "targetPrefix": "com.amazonaws.foo"
  8. },
  9. "shapes": {
  10. "InputShape": {
  11. "type": "structure",
  12. "members": {
  13. "Name": {
  14. "shape": "StringType"
  15. }
  16. }
  17. },
  18. "StringType": {
  19. "type": "string"
  20. }
  21. },
  22. "cases": [
  23. {
  24. "given": {
  25. "input": {
  26. "shape": "InputShape"
  27. },
  28. "name": "OperationName",
  29. "http": {
  30. "method": "POST"
  31. }
  32. },
  33. "params": {
  34. "Name": "myname"
  35. },
  36. "serialized": {
  37. "body": "{\"Name\": \"myname\"}",
  38. "headers": {
  39. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  40. "Content-Type": "application/x-amz-json-1.1"
  41. },
  42. "uri": "/"
  43. }
  44. }
  45. ]
  46. },
  47. {
  48. "description": "Timestamp values",
  49. "metadata": {
  50. "protocol": "json",
  51. "jsonVersion": "1.1",
  52. "targetPrefix": "com.amazonaws.foo"
  53. },
  54. "shapes": {
  55. "InputShape": {
  56. "type": "structure",
  57. "members": {
  58. "TimeArg": {
  59. "shape": "TimestampType"
  60. }
  61. }
  62. },
  63. "TimestampType": {
  64. "type": "timestamp"
  65. }
  66. },
  67. "cases": [
  68. {
  69. "given": {
  70. "input": {
  71. "shape": "InputShape"
  72. },
  73. "name": "OperationName"
  74. },
  75. "params": {
  76. "TimeArg": 1422172800
  77. },
  78. "serialized": {
  79. "body": "{\"TimeArg\": 1422172800}",
  80. "headers": {
  81. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  82. "Content-Type": "application/x-amz-json-1.1"
  83. },
  84. "uri": "/"
  85. }
  86. }
  87. ]
  88. },
  89. {
  90. "description": "Base64 encoded Blobs",
  91. "metadata": {
  92. "protocol": "json",
  93. "jsonVersion": "1.1",
  94. "targetPrefix": "com.amazonaws.foo"
  95. },
  96. "shapes": {
  97. "InputShape": {
  98. "type": "structure",
  99. "members": {
  100. "BlobArg": {
  101. "shape": "BlobType"
  102. },
  103. "BlobMap": {
  104. "shape": "BlobMapType"
  105. }
  106. }
  107. },
  108. "BlobType": {
  109. "type": "blob"
  110. },
  111. "BlobMapType": {
  112. "type": "map",
  113. "key": {"shape": "StringType"},
  114. "value": {"shape": "BlobType"}
  115. },
  116. "StringType": {
  117. "type": "string"
  118. }
  119. },
  120. "cases": [
  121. {
  122. "given": {
  123. "input": {
  124. "shape": "InputShape"
  125. },
  126. "name": "OperationName"
  127. },
  128. "params": {
  129. "BlobArg": "foo"
  130. },
  131. "serialized": {
  132. "body": "{\"BlobArg\": \"Zm9v\"}",
  133. "headers": {
  134. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  135. "Content-Type": "application/x-amz-json-1.1"
  136. },
  137. "uri": "/"
  138. }
  139. },
  140. {
  141. "given": {
  142. "input": {
  143. "shape": "InputShape"
  144. },
  145. "name": "OperationName"
  146. },
  147. "params": {
  148. "BlobMap": {
  149. "key1": "foo",
  150. "key2": "bar"
  151. }
  152. },
  153. "serialized": {
  154. "body": "{\"BlobMap\": {\"key1\": \"Zm9v\", \"key2\": \"YmFy\"}}",
  155. "headers": {
  156. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  157. "Content-Type": "application/x-amz-json-1.1"
  158. },
  159. "uri": "/"
  160. }
  161. }
  162. ]
  163. },
  164. {
  165. "description": "Nested blobs",
  166. "metadata": {
  167. "protocol": "json",
  168. "jsonVersion": "1.1",
  169. "targetPrefix": "com.amazonaws.foo"
  170. },
  171. "shapes": {
  172. "InputShape": {
  173. "type": "structure",
  174. "members": {
  175. "ListParam": {
  176. "shape": "ListOfStructures"
  177. }
  178. }
  179. },
  180. "ListOfStructures": {
  181. "type": "list",
  182. "member": {
  183. "shape": "BlobType"
  184. }
  185. },
  186. "BlobType": {
  187. "type": "blob"
  188. }
  189. },
  190. "cases": [
  191. {
  192. "given": {
  193. "http": {
  194. "method": "POST"
  195. },
  196. "input": {
  197. "shape": "InputShape"
  198. },
  199. "name": "OperationName"
  200. },
  201. "params": {
  202. "ListParam": ["foo", "bar"]
  203. },
  204. "serialized": {
  205. "body": "{\"ListParam\": [\"Zm9v\", \"YmFy\"]}",
  206. "uri": "/",
  207. "headers": {"X-Amz-Target": "com.amazonaws.foo.OperationName",
  208. "Content-Type": "application/x-amz-json-1.1"}
  209. }
  210. }
  211. ]
  212. },
  213. {
  214. "description": "Recursive shapes",
  215. "metadata": {
  216. "protocol": "json",
  217. "jsonVersion": "1.1",
  218. "targetPrefix": "com.amazonaws.foo"
  219. },
  220. "shapes": {
  221. "InputShape": {
  222. "type": "structure",
  223. "members": {
  224. "RecursiveStruct": {
  225. "shape": "RecursiveStructType"
  226. }
  227. }
  228. },
  229. "RecursiveStructType": {
  230. "type": "structure",
  231. "members": {
  232. "NoRecurse": {
  233. "shape": "StringType"
  234. },
  235. "RecursiveStruct": {
  236. "shape": "RecursiveStructType"
  237. },
  238. "RecursiveList": {
  239. "shape": "RecursiveListType"
  240. },
  241. "RecursiveMap": {
  242. "shape": "RecursiveMapType"
  243. }
  244. }
  245. },
  246. "RecursiveListType": {
  247. "type": "list",
  248. "member": {
  249. "shape": "RecursiveStructType"
  250. }
  251. },
  252. "RecursiveMapType": {
  253. "type": "map",
  254. "key": {
  255. "shape": "StringType"
  256. },
  257. "value": {
  258. "shape": "RecursiveStructType"
  259. }
  260. },
  261. "StringType": {
  262. "type": "string"
  263. }
  264. },
  265. "cases": [
  266. {
  267. "given": {
  268. "input": {
  269. "shape": "InputShape"
  270. },
  271. "name": "OperationName"
  272. },
  273. "params": {
  274. "RecursiveStruct": {
  275. "NoRecurse": "foo"
  276. }
  277. },
  278. "serialized": {
  279. "uri": "/",
  280. "headers": {
  281. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  282. "Content-Type": "application/x-amz-json-1.1"
  283. },
  284. "body": "{\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}"
  285. }
  286. },
  287. {
  288. "given": {
  289. "input": {
  290. "shape": "InputShape"
  291. },
  292. "name": "OperationName"
  293. },
  294. "params": {
  295. "RecursiveStruct": {
  296. "RecursiveStruct": {
  297. "NoRecurse": "foo"
  298. }
  299. }
  300. },
  301. "serialized": {
  302. "uri": "/",
  303. "headers": {
  304. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  305. "Content-Type": "application/x-amz-json-1.1"
  306. },
  307. "body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}"
  308. }
  309. },
  310. {
  311. "given": {
  312. "input": {
  313. "shape": "InputShape"
  314. },
  315. "name": "OperationName"
  316. },
  317. "params": {
  318. "RecursiveStruct": {
  319. "RecursiveStruct": {
  320. "RecursiveStruct": {
  321. "RecursiveStruct": {
  322. "NoRecurse": "foo"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "serialized": {
  329. "uri": "/",
  330. "headers": {
  331. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  332. "Content-Type": "application/x-amz-json-1.1"
  333. },
  334. "body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}}}"
  335. }
  336. },
  337. {
  338. "given": {
  339. "input": {
  340. "shape": "InputShape"
  341. },
  342. "name": "OperationName"
  343. },
  344. "params": {
  345. "RecursiveStruct": {
  346. "RecursiveList": [
  347. {
  348. "NoRecurse": "foo"
  349. },
  350. {
  351. "NoRecurse": "bar"
  352. }
  353. ]
  354. }
  355. },
  356. "serialized": {
  357. "uri": "/",
  358. "headers": {
  359. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  360. "Content-Type": "application/x-amz-json-1.1"
  361. },
  362. "body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"NoRecurse\": \"bar\"}]}}"
  363. }
  364. },
  365. {
  366. "given": {
  367. "input": {
  368. "shape": "InputShape"
  369. },
  370. "name": "OperationName"
  371. },
  372. "params": {
  373. "RecursiveStruct": {
  374. "RecursiveList": [
  375. {
  376. "NoRecurse": "foo"
  377. },
  378. {
  379. "RecursiveStruct": {
  380. "NoRecurse": "bar"
  381. }
  382. }
  383. ]
  384. }
  385. },
  386. "serialized": {
  387. "uri": "/",
  388. "headers": {
  389. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  390. "Content-Type": "application/x-amz-json-1.1"
  391. },
  392. "body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"RecursiveStruct\": {\"NoRecurse\": \"bar\"}}]}}"
  393. }
  394. },
  395. {
  396. "given": {
  397. "input": {
  398. "shape": "InputShape"
  399. },
  400. "name": "OperationName"
  401. },
  402. "params": {
  403. "RecursiveStruct": {
  404. "RecursiveMap": {
  405. "foo": {
  406. "NoRecurse": "foo"
  407. },
  408. "bar": {
  409. "NoRecurse": "bar"
  410. }
  411. }
  412. }
  413. },
  414. "serialized": {
  415. "uri": "/",
  416. "headers": {
  417. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  418. "Content-Type": "application/x-amz-json-1.1"
  419. },
  420. "body": "{\"RecursiveStruct\": {\"RecursiveMap\": {\"foo\": {\"NoRecurse\": \"foo\"}, \"bar\": {\"NoRecurse\": \"bar\"}}}}"
  421. }
  422. }
  423. ]
  424. },
  425. {
  426. "description": "Empty maps",
  427. "metadata": {
  428. "protocol": "json",
  429. "jsonVersion": "1.1",
  430. "targetPrefix": "com.amazonaws.foo"
  431. },
  432. "shapes": {
  433. "InputShape": {
  434. "type": "structure",
  435. "members": {
  436. "Map": {
  437. "shape": "MapType"
  438. }
  439. }
  440. },
  441. "MapType": {
  442. "type": "map",
  443. "key": {
  444. "shape": "StringType"
  445. },
  446. "value": {
  447. "shape": "StringType"
  448. }
  449. },
  450. "StringType": {
  451. "type": "string"
  452. }
  453. },
  454. "cases": [
  455. {
  456. "given": {
  457. "input": {
  458. "shape": "InputShape"
  459. },
  460. "name": "OperationName",
  461. "http": {
  462. "method": "POST"
  463. }
  464. },
  465. "params": {
  466. "Map": {}
  467. },
  468. "serialized": {
  469. "body": "{\"Map\": {}}",
  470. "headers": {
  471. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  472. "Content-Type": "application/x-amz-json-1.1"
  473. },
  474. "uri": "/"
  475. }
  476. }
  477. ]
  478. },
  479. {
  480. "description": "Idempotency token auto fill",
  481. "metadata": {
  482. "protocol": "json",
  483. "apiVersion": "2014-01-01"
  484. },
  485. "shapes": {
  486. "InputShape": {
  487. "type": "structure",
  488. "members": {
  489. "Token": {
  490. "shape": "StringType",
  491. "idempotencyToken": true
  492. }
  493. }
  494. },
  495. "StringType": {
  496. "type": "string"
  497. }
  498. },
  499. "cases": [
  500. {
  501. "given": {
  502. "input": {
  503. "shape": "InputShape"
  504. },
  505. "http": {
  506. "method": "POST",
  507. "requestUri": "/path"
  508. },
  509. "name": "OperationName"
  510. },
  511. "params": {
  512. "Token": "abc123"
  513. },
  514. "serialized": {
  515. "uri": "/path",
  516. "headers": {},
  517. "body": "{\"Token\": \"abc123\"}"
  518. }
  519. },
  520. {
  521. "given": {
  522. "input": {
  523. "shape": "InputShape"
  524. },
  525. "http": {
  526. "method": "POST",
  527. "requestUri": "/path"
  528. },
  529. "name": "OperationName"
  530. },
  531. "params": {
  532. },
  533. "serialized": {
  534. "uri": "/path",
  535. "headers": {},
  536. "body": "{\"Token\": \"00000000-0000-4000-8000-000000000000\"}"
  537. }
  538. }
  539. ]
  540. }
  541. ]