json.json 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  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. "TimeCustom": {
  62. "timestampFormat": "rfc822",
  63. "shape": "TimestampType"
  64. },
  65. "TimeFormat": {
  66. "shape": "TimestampFormatType"
  67. }
  68. }
  69. },
  70. "TimestampFormatType": {
  71. "timestampFormat": "rfc822",
  72. "type": "timestamp"
  73. },
  74. "TimestampType": {
  75. "type": "timestamp"
  76. }
  77. },
  78. "cases": [
  79. {
  80. "given": {
  81. "input": {
  82. "shape": "InputShape"
  83. },
  84. "name": "OperationName"
  85. },
  86. "params": {
  87. "TimeArg": 1422172800,
  88. "TimeCustom": 1422172800,
  89. "TimeFormat": 1422172800
  90. },
  91. "serialized": {
  92. "body": "{\"TimeArg\": 1422172800, \"TimeCustom\": \"Sun, 25 Jan 2015 08:00:00 GMT\", \"TimeFormat\": \"Sun, 25 Jan 2015 08:00:00 GMT\"}",
  93. "headers": {
  94. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  95. "Content-Type": "application/x-amz-json-1.1"
  96. },
  97. "uri": "/"
  98. }
  99. }
  100. ]
  101. },
  102. {
  103. "description": "Base64 encoded Blobs",
  104. "metadata": {
  105. "protocol": "json",
  106. "jsonVersion": "1.1",
  107. "targetPrefix": "com.amazonaws.foo"
  108. },
  109. "shapes": {
  110. "InputShape": {
  111. "type": "structure",
  112. "members": {
  113. "BlobArg": {
  114. "shape": "BlobType"
  115. },
  116. "BlobMap": {
  117. "shape": "BlobMapType"
  118. }
  119. }
  120. },
  121. "BlobType": {
  122. "type": "blob"
  123. },
  124. "BlobMapType": {
  125. "type": "map",
  126. "key": {"shape": "StringType"},
  127. "value": {"shape": "BlobType"}
  128. },
  129. "StringType": {
  130. "type": "string"
  131. }
  132. },
  133. "cases": [
  134. {
  135. "given": {
  136. "input": {
  137. "shape": "InputShape"
  138. },
  139. "name": "OperationName"
  140. },
  141. "params": {
  142. "BlobArg": "foo"
  143. },
  144. "serialized": {
  145. "body": "{\"BlobArg\": \"Zm9v\"}",
  146. "headers": {
  147. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  148. "Content-Type": "application/x-amz-json-1.1"
  149. },
  150. "uri": "/"
  151. }
  152. },
  153. {
  154. "given": {
  155. "input": {
  156. "shape": "InputShape"
  157. },
  158. "name": "OperationName"
  159. },
  160. "params": {
  161. "BlobMap": {
  162. "key1": "foo",
  163. "key2": "bar"
  164. }
  165. },
  166. "serialized": {
  167. "body": "{\"BlobMap\": {\"key1\": \"Zm9v\", \"key2\": \"YmFy\"}}",
  168. "headers": {
  169. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  170. "Content-Type": "application/x-amz-json-1.1"
  171. },
  172. "uri": "/"
  173. }
  174. }
  175. ]
  176. },
  177. {
  178. "description": "Nested blobs",
  179. "metadata": {
  180. "protocol": "json",
  181. "jsonVersion": "1.1",
  182. "targetPrefix": "com.amazonaws.foo"
  183. },
  184. "shapes": {
  185. "InputShape": {
  186. "type": "structure",
  187. "members": {
  188. "ListParam": {
  189. "shape": "ListOfStructures"
  190. }
  191. }
  192. },
  193. "ListOfStructures": {
  194. "type": "list",
  195. "member": {
  196. "shape": "BlobType"
  197. }
  198. },
  199. "BlobType": {
  200. "type": "blob"
  201. }
  202. },
  203. "cases": [
  204. {
  205. "given": {
  206. "http": {
  207. "method": "POST"
  208. },
  209. "input": {
  210. "shape": "InputShape"
  211. },
  212. "name": "OperationName"
  213. },
  214. "params": {
  215. "ListParam": ["foo", "bar"]
  216. },
  217. "serialized": {
  218. "body": "{\"ListParam\": [\"Zm9v\", \"YmFy\"]}",
  219. "uri": "/",
  220. "headers": {
  221. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  222. "Content-Type": "application/x-amz-json-1.1"
  223. }
  224. }
  225. }
  226. ]
  227. },
  228. {
  229. "description": "Recursive shapes",
  230. "metadata": {
  231. "protocol": "json",
  232. "jsonVersion": "1.1",
  233. "targetPrefix": "com.amazonaws.foo"
  234. },
  235. "shapes": {
  236. "InputShape": {
  237. "type": "structure",
  238. "members": {
  239. "RecursiveStruct": {
  240. "shape": "RecursiveStructType"
  241. }
  242. }
  243. },
  244. "RecursiveStructType": {
  245. "type": "structure",
  246. "members": {
  247. "NoRecurse": {
  248. "shape": "StringType"
  249. },
  250. "RecursiveStruct": {
  251. "shape": "RecursiveStructType"
  252. },
  253. "RecursiveList": {
  254. "shape": "RecursiveListType"
  255. },
  256. "RecursiveMap": {
  257. "shape": "RecursiveMapType"
  258. }
  259. }
  260. },
  261. "RecursiveListType": {
  262. "type": "list",
  263. "member": {
  264. "shape": "RecursiveStructType"
  265. }
  266. },
  267. "RecursiveMapType": {
  268. "type": "map",
  269. "key": {
  270. "shape": "StringType"
  271. },
  272. "value": {
  273. "shape": "RecursiveStructType"
  274. }
  275. },
  276. "StringType": {
  277. "type": "string"
  278. }
  279. },
  280. "cases": [
  281. {
  282. "given": {
  283. "input": {
  284. "shape": "InputShape"
  285. },
  286. "name": "OperationName"
  287. },
  288. "params": {
  289. "RecursiveStruct": {
  290. "NoRecurse": "foo"
  291. }
  292. },
  293. "serialized": {
  294. "uri": "/",
  295. "headers": {
  296. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  297. "Content-Type": "application/x-amz-json-1.1"
  298. },
  299. "body": "{\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}"
  300. }
  301. },
  302. {
  303. "given": {
  304. "input": {
  305. "shape": "InputShape"
  306. },
  307. "name": "OperationName"
  308. },
  309. "params": {
  310. "RecursiveStruct": {
  311. "RecursiveStruct": {
  312. "NoRecurse": "foo"
  313. }
  314. }
  315. },
  316. "serialized": {
  317. "uri": "/",
  318. "headers": {
  319. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  320. "Content-Type": "application/x-amz-json-1.1"
  321. },
  322. "body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}"
  323. }
  324. },
  325. {
  326. "given": {
  327. "input": {
  328. "shape": "InputShape"
  329. },
  330. "name": "OperationName"
  331. },
  332. "params": {
  333. "RecursiveStruct": {
  334. "RecursiveStruct": {
  335. "RecursiveStruct": {
  336. "RecursiveStruct": {
  337. "NoRecurse": "foo"
  338. }
  339. }
  340. }
  341. }
  342. },
  343. "serialized": {
  344. "uri": "/",
  345. "headers": {
  346. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  347. "Content-Type": "application/x-amz-json-1.1"
  348. },
  349. "body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}}}"
  350. }
  351. },
  352. {
  353. "given": {
  354. "input": {
  355. "shape": "InputShape"
  356. },
  357. "name": "OperationName"
  358. },
  359. "params": {
  360. "RecursiveStruct": {
  361. "RecursiveList": [
  362. {
  363. "NoRecurse": "foo"
  364. },
  365. {
  366. "NoRecurse": "bar"
  367. }
  368. ]
  369. }
  370. },
  371. "serialized": {
  372. "uri": "/",
  373. "headers": {
  374. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  375. "Content-Type": "application/x-amz-json-1.1"
  376. },
  377. "body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"NoRecurse\": \"bar\"}]}}"
  378. }
  379. },
  380. {
  381. "given": {
  382. "input": {
  383. "shape": "InputShape"
  384. },
  385. "name": "OperationName"
  386. },
  387. "params": {
  388. "RecursiveStruct": {
  389. "RecursiveList": [
  390. {
  391. "NoRecurse": "foo"
  392. },
  393. {
  394. "RecursiveStruct": {
  395. "NoRecurse": "bar"
  396. }
  397. }
  398. ]
  399. }
  400. },
  401. "serialized": {
  402. "uri": "/",
  403. "headers": {
  404. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  405. "Content-Type": "application/x-amz-json-1.1"
  406. },
  407. "body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"RecursiveStruct\": {\"NoRecurse\": \"bar\"}}]}}"
  408. }
  409. },
  410. {
  411. "given": {
  412. "input": {
  413. "shape": "InputShape"
  414. },
  415. "name": "OperationName"
  416. },
  417. "params": {
  418. "RecursiveStruct": {
  419. "RecursiveMap": {
  420. "foo": {
  421. "NoRecurse": "foo"
  422. },
  423. "bar": {
  424. "NoRecurse": "bar"
  425. }
  426. }
  427. }
  428. },
  429. "serialized": {
  430. "uri": "/",
  431. "headers": {
  432. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  433. "Content-Type": "application/x-amz-json-1.1"
  434. },
  435. "body": "{\"RecursiveStruct\": {\"RecursiveMap\": {\"foo\": {\"NoRecurse\": \"foo\"}, \"bar\": {\"NoRecurse\": \"bar\"}}}}"
  436. }
  437. }
  438. ]
  439. },
  440. {
  441. "description": "Empty maps",
  442. "metadata": {
  443. "protocol": "json",
  444. "jsonVersion": "1.1",
  445. "targetPrefix": "com.amazonaws.foo"
  446. },
  447. "shapes": {
  448. "InputShape": {
  449. "type": "structure",
  450. "members": {
  451. "Map": {
  452. "shape": "MapType"
  453. }
  454. }
  455. },
  456. "MapType": {
  457. "type": "map",
  458. "key": {
  459. "shape": "StringType"
  460. },
  461. "value": {
  462. "shape": "StringType"
  463. }
  464. },
  465. "StringType": {
  466. "type": "string"
  467. }
  468. },
  469. "cases": [
  470. {
  471. "given": {
  472. "input": {
  473. "shape": "InputShape"
  474. },
  475. "name": "OperationName",
  476. "http": {
  477. "method": "POST"
  478. }
  479. },
  480. "params": {
  481. "Map": {}
  482. },
  483. "serialized": {
  484. "body": "{\"Map\": {}}",
  485. "headers": {
  486. "X-Amz-Target": "com.amazonaws.foo.OperationName",
  487. "Content-Type": "application/x-amz-json-1.1"
  488. },
  489. "uri": "/"
  490. }
  491. }
  492. ]
  493. },
  494. {
  495. "description": "Idempotency token auto fill",
  496. "metadata": {
  497. "protocol": "json",
  498. "apiVersion": "2014-01-01"
  499. },
  500. "shapes": {
  501. "InputShape": {
  502. "type": "structure",
  503. "members": {
  504. "Token": {
  505. "shape": "StringType",
  506. "idempotencyToken": true
  507. }
  508. }
  509. },
  510. "StringType": {
  511. "type": "string"
  512. }
  513. },
  514. "cases": [
  515. {
  516. "given": {
  517. "input": {
  518. "shape": "InputShape"
  519. },
  520. "http": {
  521. "method": "POST"
  522. },
  523. "name": "OperationName"
  524. },
  525. "params": {
  526. "Token": "abc123"
  527. },
  528. "serialized": {
  529. "uri": "/",
  530. "headers": {},
  531. "body": "{\"Token\": \"abc123\"}"
  532. }
  533. },
  534. {
  535. "given": {
  536. "input": {
  537. "shape": "InputShape"
  538. },
  539. "http": {
  540. "method": "POST"
  541. },
  542. "name": "OperationName"
  543. },
  544. "params": {
  545. },
  546. "serialized": {
  547. "uri": "/",
  548. "headers": {},
  549. "body": "{\"Token\": \"00000000-0000-4000-8000-000000000000\"}"
  550. }
  551. }
  552. ]
  553. },
  554. {
  555. "description": "Enum",
  556. "metadata": {
  557. "protocol": "json",
  558. "apiVersion": "2014-01-01"
  559. },
  560. "shapes": {
  561. "InputShape": {
  562. "type": "structure",
  563. "members": {
  564. "FooEnum": {
  565. "shape": "EnumType"
  566. },
  567. "ListEnums": {
  568. "shape": "EnumList"
  569. }
  570. }
  571. },
  572. "EnumType":{
  573. "type":"string",
  574. "enum":[
  575. "foo",
  576. "bar"
  577. ]
  578. },
  579. "EnumList":{
  580. "type":"list",
  581. "member": {"shape": "EnumType"}
  582. }
  583. },
  584. "cases": [
  585. {
  586. "given": {
  587. "input": {
  588. "shape": "InputShape"
  589. },
  590. "http": {
  591. "method": "POST"
  592. },
  593. "name": "OperationName"
  594. },
  595. "params": {
  596. "FooEnum": "foo",
  597. "ListEnums": ["foo", "", "bar"]
  598. },
  599. "serialized": {
  600. "uri": "/",
  601. "headers": {},
  602. "body": "{\"FooEnum\": \"foo\", \"ListEnums\": [\"foo\", \"\", \"bar\"]}"
  603. }
  604. },
  605. {
  606. "given": {
  607. "input": {
  608. "shape": "InputShape"
  609. },
  610. "http": {
  611. "method": "POST"
  612. },
  613. "name": "OperationName"
  614. },
  615. "params": {
  616. },
  617. "serialized": {
  618. "uri": "/",
  619. "headers": {}
  620. }
  621. }
  622. ]
  623. },
  624. {
  625. "description": "Endpoint host trait static prefix",
  626. "metadata": {
  627. "protocol": "json",
  628. "jsonVersion": "1.1",
  629. "targetPrefix": "com.amazonaws.foo"
  630. },
  631. "clientEndpoint": "https://service.region.amazonaws.com",
  632. "shapes": {
  633. "StaticInputShape": {
  634. "type": "structure",
  635. "members": {
  636. "Name": {
  637. "shape": "StringType"
  638. }
  639. }
  640. },
  641. "MemberRefInputShape": {
  642. "type": "structure",
  643. "members": {
  644. "Name": {
  645. "shape": "StringType",
  646. "hostLabel": true
  647. }
  648. }
  649. },
  650. "StringType": {
  651. "type": "string"
  652. }
  653. },
  654. "cases": [
  655. {
  656. "given": {
  657. "name": "StaticOp",
  658. "input": {
  659. "shape": "StaticInputShape"
  660. },
  661. "http": {
  662. "method": "POST"
  663. },
  664. "endpoint":{
  665. "hostPrefix": "data-"
  666. }
  667. },
  668. "params": {
  669. "Name": "myname"
  670. },
  671. "serialized": {
  672. "headers": {
  673. "X-Amz-Target": "com.amazonaws.foo.StaticOp",
  674. "Content-Type": "application/x-amz-json-1.1"
  675. },
  676. "uri": "/",
  677. "body": "{\"Name\": \"myname\"}",
  678. "host": "data-service.region.amazonaws.com"
  679. }
  680. },
  681. {
  682. "given": {
  683. "name": "MemberRefOp",
  684. "input": {
  685. "shape": "MemberRefInputShape"
  686. },
  687. "http": {
  688. "method": "POST"
  689. },
  690. "endpoint":{
  691. "hostPrefix": "foo-{Name}."
  692. }
  693. },
  694. "params": {
  695. "Name": "myname"
  696. },
  697. "serialized": {
  698. "headers": {
  699. "X-Amz-Target": "com.amazonaws.foo.MemberRefOp",
  700. "Content-Type": "application/x-amz-json-1.1"
  701. },
  702. "uri": "/",
  703. "body": "{\"Name\": \"myname\"}",
  704. "host": "foo-myname.service.region.amazonaws.com"
  705. }
  706. }
  707. ]
  708. }
  709. ]