rest-json.json 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624
  1. [
  2. {
  3. "description": "No parameters",
  4. "metadata": {
  5. "protocol": "rest-json",
  6. "apiVersion": "2014-01-01"
  7. },
  8. "shapes": {},
  9. "cases": [
  10. {
  11. "given": {
  12. "http": {
  13. "method": "GET",
  14. "requestUri": "/2014-01-01/jobs"
  15. },
  16. "name": "OperationName"
  17. },
  18. "serialized": {
  19. "body": "",
  20. "uri": "/2014-01-01/jobs",
  21. "headers": {}
  22. }
  23. }
  24. ]
  25. },
  26. {
  27. "description": "URI parameter only with no location name",
  28. "metadata": {
  29. "protocol": "rest-json",
  30. "apiVersion": "2014-01-01"
  31. },
  32. "shapes": {
  33. "InputShape": {
  34. "type": "structure",
  35. "members": {
  36. "PipelineId": {
  37. "shape": "StringType",
  38. "location": "uri"
  39. }
  40. }
  41. },
  42. "StringType": {
  43. "type": "string"
  44. }
  45. },
  46. "cases": [
  47. {
  48. "given": {
  49. "http": {
  50. "method": "GET",
  51. "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
  52. },
  53. "input": {
  54. "shape": "InputShape"
  55. },
  56. "name": "OperationName"
  57. },
  58. "params": {
  59. "PipelineId": "foo"
  60. },
  61. "serialized": {
  62. "body": "",
  63. "uri": "/2014-01-01/jobsByPipeline/foo",
  64. "headers": {}
  65. }
  66. }
  67. ]
  68. },
  69. {
  70. "description": "URI parameter only with location name",
  71. "metadata": {
  72. "protocol": "rest-json",
  73. "apiVersion": "2014-01-01"
  74. },
  75. "shapes": {
  76. "InputShape": {
  77. "type": "structure",
  78. "members": {
  79. "Foo": {
  80. "shape": "StringType",
  81. "location": "uri",
  82. "locationName": "PipelineId"
  83. }
  84. }
  85. },
  86. "StringType": {
  87. "type": "string"
  88. }
  89. },
  90. "cases": [
  91. {
  92. "given": {
  93. "http": {
  94. "method": "GET",
  95. "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
  96. },
  97. "input": {
  98. "shape": "InputShape"
  99. },
  100. "name": "OperationName"
  101. },
  102. "params": {
  103. "Foo": "bar"
  104. },
  105. "serialized": {
  106. "body": "",
  107. "uri": "/2014-01-01/jobsByPipeline/bar",
  108. "headers": {}
  109. }
  110. }
  111. ]
  112. },
  113. {
  114. "description": "Querystring list of strings",
  115. "metadata": {
  116. "protocol": "rest-json",
  117. "apiVersion": "2014-01-01"
  118. },
  119. "shapes": {
  120. "InputShape": {
  121. "type": "structure",
  122. "members": {
  123. "Items": {
  124. "shape": "StringList",
  125. "location": "querystring",
  126. "locationName": "item"
  127. }
  128. }
  129. },
  130. "StringList": {
  131. "type": "list",
  132. "member": {
  133. "shape": "String"
  134. }
  135. },
  136. "String": {
  137. "type": "string"
  138. }
  139. },
  140. "cases": [
  141. {
  142. "given": {
  143. "http": {
  144. "method": "GET",
  145. "requestUri": "/path"
  146. },
  147. "input": {
  148. "shape": "InputShape"
  149. },
  150. "name": "OperationName"
  151. },
  152. "params": {
  153. "Items": ["value1", "value2"]
  154. },
  155. "serialized": {
  156. "body": "",
  157. "uri": "/path?item=value1&item=value2",
  158. "headers": {}
  159. }
  160. }
  161. ]
  162. },
  163. {
  164. "description": "String to string maps in querystring",
  165. "metadata": {
  166. "protocol": "rest-json",
  167. "apiVersion": "2014-01-01"
  168. },
  169. "shapes": {
  170. "InputShape": {
  171. "type": "structure",
  172. "members": {
  173. "PipelineId": {
  174. "shape": "StringType",
  175. "location": "uri"
  176. },
  177. "QueryDoc": {
  178. "shape": "MapStringStringType",
  179. "location": "querystring"
  180. }
  181. }
  182. },
  183. "MapStringStringType": {
  184. "type": "map",
  185. "key": {
  186. "shape": "StringType"
  187. },
  188. "value": {
  189. "shape": "StringType"
  190. }
  191. },
  192. "StringType": {
  193. "type": "string"
  194. }
  195. },
  196. "cases": [
  197. {
  198. "given": {
  199. "http": {
  200. "method": "GET",
  201. "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
  202. },
  203. "input": {
  204. "shape": "InputShape"
  205. },
  206. "name": "OperationName"
  207. },
  208. "params": {
  209. "PipelineId": "foo",
  210. "QueryDoc": {
  211. "bar": "baz",
  212. "fizz": "buzz"
  213. }
  214. },
  215. "serialized": {
  216. "body": "",
  217. "uri": "/2014-01-01/jobsByPipeline/foo?bar=baz&fizz=buzz",
  218. "headers": {}
  219. }
  220. }
  221. ]
  222. },
  223. {
  224. "description": "String to string list maps in querystring",
  225. "metadata": {
  226. "protocol": "rest-json",
  227. "apiVersion": "2014-01-01"
  228. },
  229. "shapes": {
  230. "InputShape": {
  231. "type": "structure",
  232. "members": {
  233. "PipelineId": {
  234. "shape": "StringType",
  235. "location": "uri"
  236. },
  237. "QueryDoc": {
  238. "shape": "MapStringStringListType",
  239. "location": "querystring"
  240. }
  241. }
  242. },
  243. "MapStringStringListType": {
  244. "type": "map",
  245. "key": {
  246. "shape": "StringType"
  247. },
  248. "value": {
  249. "shape": "StringListType"
  250. }
  251. },
  252. "StringListType": {
  253. "type": "list",
  254. "member": {
  255. "shape": "StringType"
  256. }
  257. },
  258. "StringType": {
  259. "type": "string"
  260. }
  261. },
  262. "cases": [
  263. {
  264. "given": {
  265. "http": {
  266. "method": "GET",
  267. "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
  268. },
  269. "input": {
  270. "shape": "InputShape"
  271. },
  272. "name": "OperationName"
  273. },
  274. "params": {
  275. "PipelineId": "id",
  276. "QueryDoc": {
  277. "foo": ["bar", "baz"],
  278. "fizz": ["buzz", "pop"]
  279. }
  280. },
  281. "serialized": {
  282. "body": "",
  283. "uri": "/2014-01-01/jobsByPipeline/id?foo=bar&foo=baz&fizz=buzz&fizz=pop",
  284. "headers": {}
  285. }
  286. }
  287. ]
  288. },
  289. {
  290. "description": "Boolean in querystring",
  291. "metadata": {
  292. "protocol": "rest-json",
  293. "apiVersion": "2014-01-01"
  294. },
  295. "shapes": {
  296. "InputShape": {
  297. "type": "structure",
  298. "members": {
  299. "BoolQuery": {
  300. "shape": "BoolType",
  301. "location": "querystring",
  302. "locationName": "bool-query"
  303. }
  304. }
  305. },
  306. "BoolType": {
  307. "type": "boolean"
  308. }
  309. },
  310. "cases": [
  311. {
  312. "given": {
  313. "http": {
  314. "method": "GET",
  315. "requestUri": "/path"
  316. },
  317. "input": {
  318. "shape": "InputShape"
  319. },
  320. "name": "OperationName"
  321. },
  322. "params": {
  323. "BoolQuery": true
  324. },
  325. "serialized": {
  326. "body": "",
  327. "uri": "/path?bool-query=true",
  328. "headers": {}
  329. }
  330. },
  331. {
  332. "given": {
  333. "http": {
  334. "method": "GET",
  335. "requestUri": "/path"
  336. },
  337. "input": {
  338. "shape": "InputShape"
  339. },
  340. "name": "OperationName"
  341. },
  342. "params": {
  343. "BoolQuery": false
  344. },
  345. "serialized": {
  346. "body": "",
  347. "uri": "/path?bool-query=false",
  348. "headers": {}
  349. }
  350. }
  351. ]
  352. },
  353. {
  354. "description": "URI parameter and querystring params",
  355. "metadata": {
  356. "protocol": "rest-json",
  357. "apiVersion": "2014-01-01"
  358. },
  359. "shapes": {
  360. "InputShape": {
  361. "type": "structure",
  362. "members": {
  363. "PipelineId": {
  364. "shape": "StringType",
  365. "location": "uri",
  366. "locationName": "PipelineId"
  367. },
  368. "Ascending": {
  369. "shape": "StringType",
  370. "location": "querystring",
  371. "locationName": "Ascending"
  372. },
  373. "PageToken": {
  374. "shape": "StringType",
  375. "location": "querystring",
  376. "locationName": "PageToken"
  377. }
  378. }
  379. },
  380. "StringType": {
  381. "type": "string"
  382. }
  383. },
  384. "cases": [
  385. {
  386. "given": {
  387. "http": {
  388. "method": "GET",
  389. "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
  390. },
  391. "input": {
  392. "shape": "InputShape"
  393. },
  394. "name": "OperationName"
  395. },
  396. "params": {
  397. "PipelineId": "foo",
  398. "Ascending": "true",
  399. "PageToken": "bar"
  400. },
  401. "serialized": {
  402. "body": "",
  403. "uri": "/2014-01-01/jobsByPipeline/foo?Ascending=true&PageToken=bar",
  404. "headers": {}
  405. }
  406. }
  407. ]
  408. },
  409. {
  410. "description": "URI parameter, querystring params and JSON body",
  411. "metadata": {
  412. "protocol": "rest-json",
  413. "apiVersion": "2014-01-01"
  414. },
  415. "shapes": {
  416. "InputShape": {
  417. "type": "structure",
  418. "members": {
  419. "PipelineId": {
  420. "shape": "StringType",
  421. "location": "uri",
  422. "locationName": "PipelineId"
  423. },
  424. "Ascending": {
  425. "shape": "StringType",
  426. "location": "querystring",
  427. "locationName": "Ascending"
  428. },
  429. "PageToken": {
  430. "shape": "StringType",
  431. "location": "querystring",
  432. "locationName": "PageToken"
  433. },
  434. "Config": {
  435. "shape": "StructType"
  436. }
  437. }
  438. },
  439. "StringType": {
  440. "type": "string"
  441. },
  442. "StructType": {
  443. "type": "structure",
  444. "members": {
  445. "A": {
  446. "shape": "StringType"
  447. },
  448. "B": {
  449. "shape": "StringType"
  450. }
  451. }
  452. }
  453. },
  454. "cases": [
  455. {
  456. "given": {
  457. "http": {
  458. "method": "POST",
  459. "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
  460. },
  461. "input": {
  462. "shape": "InputShape"
  463. },
  464. "name": "OperationName"
  465. },
  466. "params": {
  467. "PipelineId": "foo",
  468. "Ascending": "true",
  469. "PageToken": "bar",
  470. "Config": {
  471. "A": "one",
  472. "B": "two"
  473. }
  474. },
  475. "serialized": {
  476. "body": "{\"Config\": {\"A\": \"one\", \"B\": \"two\"}}",
  477. "uri": "/2014-01-01/jobsByPipeline/foo?Ascending=true&PageToken=bar",
  478. "headers": {}
  479. }
  480. }
  481. ]
  482. },
  483. {
  484. "description": "URI parameter, querystring params, headers and JSON body",
  485. "metadata": {
  486. "protocol": "rest-json",
  487. "apiVersion": "2014-01-01"
  488. },
  489. "shapes": {
  490. "InputShape": {
  491. "type": "structure",
  492. "members": {
  493. "PipelineId": {
  494. "shape": "StringType",
  495. "location": "uri",
  496. "locationName": "PipelineId"
  497. },
  498. "Ascending": {
  499. "shape": "StringType",
  500. "location": "querystring",
  501. "locationName": "Ascending"
  502. },
  503. "Checksum": {
  504. "shape": "StringType",
  505. "location": "header",
  506. "locationName": "x-amz-checksum"
  507. },
  508. "PageToken": {
  509. "shape": "StringType",
  510. "location": "querystring",
  511. "locationName": "PageToken"
  512. },
  513. "Config": {
  514. "shape": "StructType"
  515. }
  516. }
  517. },
  518. "StringType": {
  519. "type": "string"
  520. },
  521. "StructType": {
  522. "type": "structure",
  523. "members": {
  524. "A": {
  525. "shape": "StringType"
  526. },
  527. "B": {
  528. "shape": "StringType"
  529. }
  530. }
  531. }
  532. },
  533. "cases": [
  534. {
  535. "given": {
  536. "http": {
  537. "method": "POST",
  538. "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
  539. },
  540. "input": {
  541. "shape": "InputShape"
  542. },
  543. "name": "OperationName"
  544. },
  545. "params": {
  546. "PipelineId": "foo",
  547. "Ascending": "true",
  548. "Checksum": "12345",
  549. "PageToken": "bar",
  550. "Config": {
  551. "A": "one",
  552. "B": "two"
  553. }
  554. },
  555. "serialized": {
  556. "body": "{\"Config\": {\"A\": \"one\", \"B\": \"two\"}}",
  557. "uri": "/2014-01-01/jobsByPipeline/foo?Ascending=true&PageToken=bar",
  558. "headers": {
  559. "x-amz-checksum": "12345"
  560. }
  561. }
  562. }
  563. ]
  564. },
  565. {
  566. "description": "Streaming payload",
  567. "metadata": {
  568. "protocol": "rest-json",
  569. "apiVersion": "2014-01-01"
  570. },
  571. "shapes": {
  572. "InputShape": {
  573. "type": "structure",
  574. "members": {
  575. "vaultName": {
  576. "shape": "StringType",
  577. "location": "uri",
  578. "locationName": "vaultName"
  579. },
  580. "checksum": {
  581. "shape": "StringType",
  582. "location": "header",
  583. "locationName": "x-amz-sha256-tree-hash"
  584. },
  585. "body": {
  586. "shape": "Stream"
  587. }
  588. },
  589. "required": [
  590. "vaultName"
  591. ],
  592. "payload": "body"
  593. },
  594. "StringType": {
  595. "type": "string"
  596. },
  597. "Stream": {
  598. "type": "blob",
  599. "streaming": true
  600. }
  601. },
  602. "cases": [
  603. {
  604. "given": {
  605. "http": {
  606. "method": "POST",
  607. "requestUri": "/2014-01-01/vaults/{vaultName}/archives"
  608. },
  609. "input": {
  610. "shape": "InputShape"
  611. },
  612. "name": "OperationName"
  613. },
  614. "params": {
  615. "vaultName": "name",
  616. "checksum": "foo",
  617. "body": "contents"
  618. },
  619. "serialized": {
  620. "body": "contents",
  621. "uri": "/2014-01-01/vaults/name/archives",
  622. "headers": {
  623. "x-amz-sha256-tree-hash": "foo"
  624. }
  625. }
  626. }
  627. ]
  628. },
  629. {
  630. "description": "Serialize blobs in body",
  631. "metadata": {
  632. "protocol": "rest-json",
  633. "apiVersion": "2014-01-01"
  634. },
  635. "shapes": {
  636. "InputShape": {
  637. "type": "structure",
  638. "members": {
  639. "Foo": {
  640. "shape": "StringType",
  641. "location": "uri",
  642. "locationName": "Foo"
  643. },
  644. "Bar": {"shape": "BlobType"}
  645. },
  646. "required": [
  647. "Foo"
  648. ]
  649. },
  650. "StringType": {
  651. "type": "string"
  652. },
  653. "BlobType": {
  654. "type": "blob"
  655. }
  656. },
  657. "cases": [
  658. {
  659. "given": {
  660. "http": {
  661. "method": "POST",
  662. "requestUri": "/2014-01-01/{Foo}"
  663. },
  664. "input": {
  665. "shape": "InputShape"
  666. },
  667. "name": "OperationName"
  668. },
  669. "params": {
  670. "Foo": "foo_name",
  671. "Bar": "Blob param"
  672. },
  673. "serialized": {
  674. "body": "{\"Bar\": \"QmxvYiBwYXJhbQ==\"}",
  675. "uri": "/2014-01-01/foo_name"
  676. }
  677. }
  678. ]
  679. },
  680. {
  681. "description": "Blob payload",
  682. "metadata": {
  683. "protocol": "rest-json",
  684. "apiVersion": "2014-01-01"
  685. },
  686. "shapes": {
  687. "InputShape": {
  688. "type": "structure",
  689. "members": {
  690. "foo": {
  691. "shape": "FooShape"
  692. }
  693. }
  694. },
  695. "FooShape": {
  696. "type": "blob"
  697. }
  698. },
  699. "cases": [
  700. {
  701. "given": {
  702. "http": {
  703. "method": "POST",
  704. "requestUri": "/"
  705. },
  706. "input": {
  707. "shape": "InputShape",
  708. "payload": "foo"
  709. },
  710. "name": "OperationName"
  711. },
  712. "params": {
  713. "foo": "bar"
  714. },
  715. "serialized": {
  716. "method": "POST",
  717. "body": "bar",
  718. "uri": "/"
  719. }
  720. },
  721. {
  722. "given": {
  723. "http": {
  724. "method": "POST",
  725. "requestUri": "/"
  726. },
  727. "input": {
  728. "shape": "InputShape",
  729. "payload": "foo"
  730. },
  731. "name": "OperationName"
  732. },
  733. "params": {
  734. },
  735. "serialized": {
  736. "method": "POST",
  737. "body": "",
  738. "uri": "/"
  739. }
  740. }
  741. ]
  742. },
  743. {
  744. "description": "Structure payload",
  745. "metadata": {
  746. "protocol": "rest-json",
  747. "apiVersion": "2014-01-01"
  748. },
  749. "shapes": {
  750. "InputShape": {
  751. "type": "structure",
  752. "members": {
  753. "foo": {
  754. "shape": "FooShape"
  755. }
  756. }
  757. },
  758. "FooShape": {
  759. "locationName": "foo",
  760. "type": "structure",
  761. "members": {
  762. "baz": {
  763. "shape": "BazShape"
  764. }
  765. }
  766. },
  767. "BazShape": {
  768. "type": "string"
  769. }
  770. },
  771. "cases": [
  772. {
  773. "given": {
  774. "http": {
  775. "method": "POST",
  776. "requestUri": "/"
  777. },
  778. "input": {
  779. "shape": "InputShape",
  780. "payload": "foo"
  781. },
  782. "name": "OperationName"
  783. },
  784. "params": {
  785. "foo": {
  786. "baz": "bar"
  787. }
  788. },
  789. "serialized": {
  790. "method": "POST",
  791. "body": "{\"baz\": \"bar\"}",
  792. "uri": "/"
  793. }
  794. },
  795. {
  796. "given": {
  797. "http": {
  798. "method": "POST",
  799. "requestUri": "/"
  800. },
  801. "input": {
  802. "shape": "InputShape",
  803. "payload": "foo"
  804. },
  805. "name": "OperationName"
  806. },
  807. "params": {},
  808. "serialized": {
  809. "method": "POST",
  810. "body": "",
  811. "uri": "/"
  812. }
  813. }
  814. ]
  815. },
  816. {
  817. "description": "Omits null query params, but serializes empty strings",
  818. "metadata": {
  819. "protocol": "rest-json",
  820. "apiVersion": "2014-01-01"
  821. },
  822. "shapes": {
  823. "InputShape": {
  824. "type": "structure",
  825. "members": {
  826. "foo": {
  827. "location":"querystring",
  828. "locationName":"param-name",
  829. "shape": "Foo"
  830. }
  831. }
  832. },
  833. "Foo": {
  834. "type": "string"
  835. }
  836. },
  837. "cases": [
  838. {
  839. "given": {
  840. "name": "OperationName",
  841. "http": {
  842. "method": "POST",
  843. "requestUri": "/path"
  844. },
  845. "input": { "shape": "InputShape" }
  846. },
  847. "params": { "foo": null },
  848. "serialized": {
  849. "method": "POST",
  850. "body": "",
  851. "uri": "/path"
  852. }
  853. },
  854. {
  855. "given": {
  856. "name": "OperationName",
  857. "http": {
  858. "method": "POST",
  859. "requestUri": "/path?abc=mno"
  860. },
  861. "input": { "shape": "InputShape" }
  862. },
  863. "params": { "foo": "" },
  864. "serialized": {
  865. "method": "POST",
  866. "body": "",
  867. "uri": "/path?abc=mno&param-name="
  868. }
  869. }
  870. ]
  871. },
  872. {
  873. "description": "Recursive shapes",
  874. "metadata": {
  875. "protocol": "rest-json",
  876. "apiVersion": "2014-01-01"
  877. },
  878. "shapes": {
  879. "InputShape": {
  880. "type": "structure",
  881. "members": {
  882. "RecursiveStruct": {
  883. "shape": "RecursiveStructType"
  884. }
  885. }
  886. },
  887. "RecursiveStructType": {
  888. "type": "structure",
  889. "members": {
  890. "NoRecurse": {
  891. "shape": "StringType"
  892. },
  893. "RecursiveStruct": {
  894. "shape": "RecursiveStructType"
  895. },
  896. "RecursiveList": {
  897. "shape": "RecursiveListType"
  898. },
  899. "RecursiveMap": {
  900. "shape": "RecursiveMapType"
  901. }
  902. }
  903. },
  904. "RecursiveListType": {
  905. "type": "list",
  906. "member": {
  907. "shape": "RecursiveStructType"
  908. }
  909. },
  910. "RecursiveMapType": {
  911. "type": "map",
  912. "key": {
  913. "shape": "StringType"
  914. },
  915. "value": {
  916. "shape": "RecursiveStructType"
  917. }
  918. },
  919. "StringType": {
  920. "type": "string"
  921. }
  922. },
  923. "cases": [
  924. {
  925. "given": {
  926. "input": {
  927. "shape": "InputShape"
  928. },
  929. "http": {
  930. "method": "POST",
  931. "requestUri": "/path"
  932. },
  933. "name": "OperationName"
  934. },
  935. "params": {
  936. "RecursiveStruct": {
  937. "NoRecurse": "foo"
  938. }
  939. },
  940. "serialized": {
  941. "uri": "/path" ,
  942. "headers": {},
  943. "body": "{\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}"
  944. }
  945. },
  946. {
  947. "given": {
  948. "input": {
  949. "shape": "InputShape"
  950. },
  951. "http": {
  952. "method": "POST",
  953. "requestUri": "/path"
  954. },
  955. "name": "OperationName"
  956. },
  957. "params": {
  958. "RecursiveStruct": {
  959. "RecursiveStruct": {
  960. "NoRecurse": "foo"
  961. }
  962. }
  963. },
  964. "serialized": {
  965. "uri": "/path",
  966. "headers": {},
  967. "body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}"
  968. }
  969. },
  970. {
  971. "given": {
  972. "input": {
  973. "shape": "InputShape"
  974. },
  975. "http": {
  976. "method": "POST",
  977. "requestUri": "/path"
  978. },
  979. "name": "OperationName"
  980. },
  981. "params": {
  982. "RecursiveStruct": {
  983. "RecursiveStruct": {
  984. "RecursiveStruct": {
  985. "RecursiveStruct": {
  986. "NoRecurse": "foo"
  987. }
  988. }
  989. }
  990. }
  991. },
  992. "serialized": {
  993. "uri": "/path",
  994. "headers": {},
  995. "body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}}}"
  996. }
  997. },
  998. {
  999. "given": {
  1000. "input": {
  1001. "shape": "InputShape"
  1002. },
  1003. "http": {
  1004. "method": "POST",
  1005. "requestUri": "/path"
  1006. },
  1007. "name": "OperationName"
  1008. },
  1009. "params": {
  1010. "RecursiveStruct": {
  1011. "RecursiveList": [
  1012. {
  1013. "NoRecurse": "foo"
  1014. },
  1015. {
  1016. "NoRecurse": "bar"
  1017. }
  1018. ]
  1019. }
  1020. },
  1021. "serialized": {
  1022. "uri": "/path",
  1023. "headers": {},
  1024. "body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"NoRecurse\": \"bar\"}]}}"
  1025. }
  1026. },
  1027. {
  1028. "given": {
  1029. "input": {
  1030. "shape": "InputShape"
  1031. },
  1032. "http": {
  1033. "method": "POST",
  1034. "requestUri": "/path"
  1035. },
  1036. "name": "OperationName"
  1037. },
  1038. "params": {
  1039. "RecursiveStruct": {
  1040. "RecursiveList": [
  1041. {
  1042. "NoRecurse": "foo"
  1043. },
  1044. {
  1045. "RecursiveStruct": {
  1046. "NoRecurse": "bar"
  1047. }
  1048. }
  1049. ]
  1050. }
  1051. },
  1052. "serialized": {
  1053. "uri": "/path",
  1054. "headers": {},
  1055. "body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"RecursiveStruct\": {\"NoRecurse\": \"bar\"}}]}}"
  1056. }
  1057. },
  1058. {
  1059. "given": {
  1060. "input": {
  1061. "shape": "InputShape"
  1062. },
  1063. "http": {
  1064. "method": "POST",
  1065. "requestUri": "/path"
  1066. },
  1067. "name": "OperationName"
  1068. },
  1069. "params": {
  1070. "RecursiveStruct": {
  1071. "RecursiveMap": {
  1072. "foo": {
  1073. "NoRecurse": "foo"
  1074. },
  1075. "bar": {
  1076. "NoRecurse": "bar"
  1077. }
  1078. }
  1079. }
  1080. },
  1081. "serialized": {
  1082. "uri": "/path",
  1083. "headers": {},
  1084. "body": "{\"RecursiveStruct\": {\"RecursiveMap\": {\"foo\": {\"NoRecurse\": \"foo\"}, \"bar\": {\"NoRecurse\": \"bar\"}}}}"
  1085. }
  1086. }
  1087. ]
  1088. },
  1089. {
  1090. "description": "Timestamp values",
  1091. "metadata": {
  1092. "protocol": "rest-json",
  1093. "apiVersion": "2014-01-01"
  1094. },
  1095. "shapes": {
  1096. "InputShape": {
  1097. "type": "structure",
  1098. "members": {
  1099. "TimeArg": {
  1100. "shape": "TimestampType"
  1101. },
  1102. "TimeArgInHeader": {
  1103. "shape": "TimestampType",
  1104. "location": "header",
  1105. "locationName": "x-amz-timearg"
  1106. },
  1107. "TimeArgInQuery": {
  1108. "shape": "TimestampType",
  1109. "location": "querystring",
  1110. "locationName": "TimeQuery"
  1111. },
  1112. "TimeCustom": {
  1113. "timestampFormat": "iso8601",
  1114. "shape": "TimestampType"
  1115. },
  1116. "TimeCustomInHeader": {
  1117. "timestampFormat": "unixTimestamp",
  1118. "shape": "TimestampType",
  1119. "location": "header",
  1120. "locationName": "x-amz-timecustom-header"
  1121. },
  1122. "TimeCustomInQuery": {
  1123. "timestampFormat": "unixTimestamp",
  1124. "shape": "TimestampType",
  1125. "location": "querystring",
  1126. "locationName": "TimeCustomQuery"
  1127. },
  1128. "TimeFormat": {
  1129. "shape": "TimestampFormatRfcType"
  1130. },
  1131. "TimeFormatInHeader": {
  1132. "shape": "TimestampFormatUnixType",
  1133. "location": "header",
  1134. "locationName": "x-amz-timeformat-header"
  1135. },
  1136. "TimeFormatInQuery": {
  1137. "shape": "TimestampFormatUnixType",
  1138. "location": "querystring",
  1139. "locationName": "TimeFormatQuery"
  1140. }
  1141. }
  1142. },
  1143. "TimestampFormatRfcType": {
  1144. "timestampFormat": "rfc822",
  1145. "type": "timestamp"
  1146. },
  1147. "TimestampFormatUnixType": {
  1148. "timestampFormat": "unixTimestamp",
  1149. "type": "timestamp"
  1150. },
  1151. "TimestampType": {
  1152. "type": "timestamp"
  1153. }
  1154. },
  1155. "cases": [
  1156. {
  1157. "given": {
  1158. "input": {
  1159. "shape": "InputShape"
  1160. },
  1161. "http": {
  1162. "method": "POST",
  1163. "requestUri": "/path"
  1164. },
  1165. "name": "OperationName"
  1166. },
  1167. "params": {
  1168. "TimeArg": 1422172800,
  1169. "TimeArgInQuery": 1422172800,
  1170. "TimeArgInHeader": 1422172800,
  1171. "TimeCustom": 1422172800,
  1172. "TimeCustomInQuery": 1422172800,
  1173. "TimeCustomInHeader": 1422172800,
  1174. "TimeFormat": 1422172800,
  1175. "TimeFormatInQuery": 1422172800,
  1176. "TimeFormatInHeader": 1422172800
  1177. },
  1178. "serialized": {
  1179. "uri": "/path?TimeQuery=2015-01-25T08%3A00%3A00Z&TimeCustomQuery=1422172800&TimeFormatQuery=1422172800",
  1180. "headers": {
  1181. "x-amz-timearg": "Sun, 25 Jan 2015 08:00:00 GMT",
  1182. "x-amz-timecustom-header": "1422172800",
  1183. "x-amz-timeformat-header": "1422172800"
  1184. },
  1185. "body": "{\"TimeArg\": 1422172800, \"TimeCustom\": \"2015-01-25T08:00:00Z\", \"TimeFormat\": \"Sun, 25 Jan 2015 08:00:00 GMT\"}"
  1186. }
  1187. }
  1188. ]
  1189. },
  1190. {
  1191. "description": "Named locations in JSON body",
  1192. "metadata": {
  1193. "protocol": "rest-json",
  1194. "apiVersion": "2014-01-01"
  1195. },
  1196. "shapes": {
  1197. "InputShape": {
  1198. "type": "structure",
  1199. "members": {
  1200. "TimeArg": {
  1201. "shape": "TimestampType",
  1202. "locationName": "timestamp_location"
  1203. }
  1204. }
  1205. },
  1206. "TimestampType": {
  1207. "type": "timestamp"
  1208. }
  1209. },
  1210. "cases": [
  1211. {
  1212. "given": {
  1213. "input": {
  1214. "shape": "InputShape"
  1215. },
  1216. "http": {
  1217. "method": "POST",
  1218. "requestUri": "/path"
  1219. },
  1220. "name": "OperationName"
  1221. },
  1222. "params": {
  1223. "TimeArg": 1422172800
  1224. },
  1225. "serialized": {
  1226. "uri": "/path",
  1227. "headers": {},
  1228. "body": "{\"timestamp_location\": 1422172800}"
  1229. }
  1230. }
  1231. ]
  1232. },
  1233. {
  1234. "description": "String payload",
  1235. "metadata": {
  1236. "protocol": "rest-json",
  1237. "apiVersion": "2014-01-01"
  1238. },
  1239. "shapes": {
  1240. "InputShape": {
  1241. "type": "structure",
  1242. "members": {
  1243. "foo": {
  1244. "shape": "FooShape"
  1245. }
  1246. }
  1247. },
  1248. "FooShape": {
  1249. "type": "string"
  1250. }
  1251. },
  1252. "cases": [
  1253. {
  1254. "given": {
  1255. "http": {
  1256. "method": "POST",
  1257. "requestUri": "/"
  1258. },
  1259. "input": {
  1260. "shape": "InputShape",
  1261. "payload": "foo"
  1262. },
  1263. "name": "OperationName"
  1264. },
  1265. "params": {
  1266. "foo": "bar"
  1267. },
  1268. "serialized": {
  1269. "method": "POST",
  1270. "body": "bar",
  1271. "uri": "/"
  1272. }
  1273. }
  1274. ]
  1275. },
  1276. {
  1277. "description": "Idempotency token auto fill",
  1278. "metadata": {
  1279. "protocol": "rest-json",
  1280. "apiVersion": "2014-01-01"
  1281. },
  1282. "shapes": {
  1283. "InputShape": {
  1284. "type": "structure",
  1285. "members": {
  1286. "Token": {
  1287. "shape": "StringType",
  1288. "idempotencyToken": true
  1289. }
  1290. }
  1291. },
  1292. "StringType": {
  1293. "type": "string"
  1294. }
  1295. },
  1296. "cases": [
  1297. {
  1298. "given": {
  1299. "input": {
  1300. "shape": "InputShape"
  1301. },
  1302. "http": {
  1303. "method": "POST",
  1304. "requestUri": "/path"
  1305. },
  1306. "name": "OperationName"
  1307. },
  1308. "params": {
  1309. "Token": "abc123"
  1310. },
  1311. "serialized": {
  1312. "uri": "/path",
  1313. "headers": {},
  1314. "body": "{\"Token\": \"abc123\"}"
  1315. }
  1316. },
  1317. {
  1318. "given": {
  1319. "input": {
  1320. "shape": "InputShape"
  1321. },
  1322. "http": {
  1323. "method": "POST",
  1324. "requestUri": "/path"
  1325. },
  1326. "name": "OperationName"
  1327. },
  1328. "params": {
  1329. },
  1330. "serialized": {
  1331. "uri": "/path",
  1332. "headers": {},
  1333. "body": "{\"Token\": \"00000000-0000-4000-8000-000000000000\"}"
  1334. }
  1335. }
  1336. ]
  1337. },
  1338. {
  1339. "description": "JSON value trait",
  1340. "metadata": {
  1341. "protocol": "rest-json",
  1342. "apiVersion": "2014-01-01"
  1343. },
  1344. "shapes": {
  1345. "InputShape": {
  1346. "type": "structure",
  1347. "payload": "Body",
  1348. "members": {
  1349. "HeaderField": {
  1350. "shape": "StringType",
  1351. "jsonvalue": true,
  1352. "location": "header",
  1353. "locationName": "X-Amz-Foo"
  1354. },
  1355. "QueryField": {
  1356. "shape": "StringType",
  1357. "jsonvalue": true,
  1358. "location": "querystring",
  1359. "locationName": "Bar"
  1360. },
  1361. "Body": {
  1362. "shape": "BodyStructure"
  1363. }
  1364. }
  1365. },
  1366. "StringType": {
  1367. "type": "string"
  1368. },
  1369. "ListType": {
  1370. "type": "list",
  1371. "member": {
  1372. "shape": "StringType",
  1373. "jsonvalue": true
  1374. }
  1375. },
  1376. "BodyStructure": {
  1377. "type": "structure",
  1378. "members": {
  1379. "BodyField": {
  1380. "shape": "StringType",
  1381. "jsonvalue": true
  1382. },
  1383. "BodyListField": {
  1384. "shape": "ListType"
  1385. }
  1386. }
  1387. }
  1388. },
  1389. "cases": [
  1390. {
  1391. "given": {
  1392. "input": {
  1393. "shape": "InputShape"
  1394. },
  1395. "http": {
  1396. "method": "POST"
  1397. },
  1398. "name": "OperationName"
  1399. },
  1400. "params": {
  1401. "HeaderField": {"Foo":"Bar"},
  1402. "QueryField": {"Foo":"Bar"},
  1403. "Body": {
  1404. "BodyField": {"Foo":"Bar"}
  1405. }
  1406. },
  1407. "serialized": {
  1408. "uri": "/?Bar=%7B%22Foo%22%3A%22Bar%22%7D",
  1409. "headers": {"X-Amz-Foo": "eyJGb28iOiJCYXIifQ=="},
  1410. "body": "{\"BodyField\":\"{\\\"Foo\\\":\\\"Bar\\\"}\"}"
  1411. }
  1412. },
  1413. {
  1414. "given": {
  1415. "input": {
  1416. "shape": "InputShape"
  1417. },
  1418. "http": {
  1419. "method": "POST"
  1420. },
  1421. "name": "OperationName"
  1422. },
  1423. "params": {
  1424. "Body": {
  1425. "BodyListField": [{"Foo":"Bar"}]
  1426. }
  1427. },
  1428. "serialized": {
  1429. "uri": "/",
  1430. "headers": {},
  1431. "body": "{\"BodyListField\":[\"{\\\"Foo\\\":\\\"Bar\\\"}\"]}"
  1432. }
  1433. },
  1434. {
  1435. "given": {
  1436. "input": {
  1437. "shape": "InputShape"
  1438. },
  1439. "http": {
  1440. "method": "POST"
  1441. },
  1442. "name": "OperationName"
  1443. },
  1444. "params": {
  1445. },
  1446. "serialized": {
  1447. "uri": "/",
  1448. "headers": {},
  1449. "body": ""
  1450. }
  1451. }
  1452. ]
  1453. },
  1454. {
  1455. "description": "Enum",
  1456. "metadata": {
  1457. "protocol": "rest-json",
  1458. "apiVersion": "2014-01-01"
  1459. },
  1460. "shapes": {
  1461. "InputShape": {
  1462. "type": "structure",
  1463. "members": {
  1464. "HeaderEnum": {
  1465. "shape": "EnumType",
  1466. "location": "header",
  1467. "locationName": "x-amz-enum"
  1468. },
  1469. "FooEnum": {
  1470. "shape": "EnumType"
  1471. },
  1472. "QueryFooEnum": {
  1473. "shape": "EnumType",
  1474. "location": "querystring",
  1475. "locationName": "Enum"
  1476. },
  1477. "ListEnums": {
  1478. "shape": "EnumList"
  1479. },
  1480. "QueryListEnums": {
  1481. "shape": "EnumList",
  1482. "location": "querystring",
  1483. "locationName": "List"
  1484. }
  1485. }
  1486. },
  1487. "EnumType":{
  1488. "type":"string",
  1489. "enum":[
  1490. "foo",
  1491. "bar",
  1492. "0",
  1493. "1"
  1494. ]
  1495. },
  1496. "EnumList":{
  1497. "type":"list",
  1498. "member": {"shape": "EnumType"}
  1499. }
  1500. },
  1501. "cases": [
  1502. {
  1503. "given": {
  1504. "input": {
  1505. "shape": "InputShape"
  1506. },
  1507. "http": {
  1508. "method": "POST",
  1509. "requestUri": "/path"
  1510. },
  1511. "name": "OperationName"
  1512. },
  1513. "params": {
  1514. "HeaderEnum": "baz",
  1515. "FooEnum": "foo",
  1516. "QueryFooEnum": "bar",
  1517. "ListEnums": ["foo", "", "bar"],
  1518. "QueryListEnums": ["0", "", "1"]
  1519. },
  1520. "serialized": {
  1521. "uri": "/path?Enum=bar&List=0&List=1&List=",
  1522. "headers": {"x-amz-enum": "baz"},
  1523. "body": "{\"FooEnum\": \"foo\", \"ListEnums\": [\"foo\", \"\", \"bar\"]}"
  1524. }
  1525. },
  1526. {
  1527. "given": {
  1528. "input": {
  1529. "shape": "InputShape"
  1530. },
  1531. "http": {
  1532. "method": "POST",
  1533. "requestUri": "/path"
  1534. },
  1535. "name": "OperationName"
  1536. },
  1537. "params": {
  1538. },
  1539. "serialized": {
  1540. "uri": "/path",
  1541. "headers": {}
  1542. }
  1543. }
  1544. ]
  1545. },
  1546. {
  1547. "description": "Endpoint host trait",
  1548. "metadata": {
  1549. "protocol": "rest-json",
  1550. "apiVersion": "2014-01-01"
  1551. },
  1552. "clientEndpoint": "https://service.region.amazonaws.com",
  1553. "shapes": {
  1554. "StaticInputShape": {
  1555. "type": "structure",
  1556. "members": {
  1557. "Name": {
  1558. "shape": "StringType"
  1559. }
  1560. }
  1561. },
  1562. "MemberRefInputShape": {
  1563. "type": "structure",
  1564. "members": {
  1565. "Name": {
  1566. "shape": "StringType",
  1567. "hostLabel": true
  1568. }
  1569. }
  1570. },
  1571. "StringType": {
  1572. "type": "string"
  1573. }
  1574. },
  1575. "cases": [
  1576. {
  1577. "given": {
  1578. "name": "StaticOp",
  1579. "input": {
  1580. "shape": "StaticInputShape"
  1581. },
  1582. "http": {
  1583. "method": "POST",
  1584. "requestUri": "/path"
  1585. },
  1586. "endpoint":{
  1587. "hostPrefix": "data-"
  1588. }
  1589. },
  1590. "params": {
  1591. "Name": "myname"
  1592. },
  1593. "serialized": {
  1594. "uri": "/path",
  1595. "body": "{\"Name\": \"myname\"}",
  1596. "host": "data-service.region.amazonaws.com"
  1597. }
  1598. },
  1599. {
  1600. "given": {
  1601. "name": "MemberRefOp",
  1602. "input": {
  1603. "shape": "MemberRefInputShape"
  1604. },
  1605. "http": {
  1606. "method": "GET",
  1607. "requestUri": "/path"
  1608. },
  1609. "endpoint":{
  1610. "hostPrefix": "foo-{Name}."
  1611. }
  1612. },
  1613. "params": {
  1614. "Name": "myname"
  1615. },
  1616. "serialized": {
  1617. "uri": "/path",
  1618. "body": "{\"Name\": \"myname\"}",
  1619. "host": "foo-myname.service.region.amazonaws.com"
  1620. }
  1621. }
  1622. ]
  1623. }
  1624. ]