| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720 |
- [
- {
- "description": "Scalar members",
- "metadata": {
- "protocol": "rest-xml"
- },
- "shapes": {
- "OutputShape": {
- "type": "structure",
- "members": {
- "ImaHeader": {
- "shape": "HeaderShape"
- },
- "ImaHeaderLocation": {
- "shape": "HeaderShape",
- "locationName": "X-Foo"
- },
- "Str": {
- "shape": "StringType"
- },
- "Num": {
- "shape": "IntegerType",
- "locationName": "FooNum"
- },
- "FalseBool": {
- "shape": "BooleanType"
- },
- "TrueBool": {
- "shape": "BooleanType"
- },
- "Float": {
- "shape": "FloatType"
- },
- "Double": {
- "shape": "DoubleType"
- },
- "Long": {
- "shape": "LongType"
- },
- "Char": {
- "shape": "CharType"
- },
- "Timestamp": {
- "shape": "TimestampType"
- }
- }
- },
- "StringType": {
- "type": "string"
- },
- "IntegerType": {
- "type": "integer"
- },
- "BooleanType": {
- "type": "boolean"
- },
- "FloatType": {
- "type": "float"
- },
- "DoubleType": {
- "type": "double"
- },
- "LongType": {
- "type": "long"
- },
- "CharType": {
- "type": "character"
- },
- "HeaderShape": {
- "type": "string",
- "location": "header"
- },
- "StatusShape": {
- "type": "integer",
- "location": "statusCode"
- },
- "TimestampType": {
- "type": "timestamp"
- }
- },
- "cases": [
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "ImaHeader": "test",
- "ImaHeaderLocation": "abc",
- "Str": "myname",
- "Num": 123,
- "FalseBool": false,
- "TrueBool": true,
- "Float": 1.2,
- "Double": 1.3,
- "Long": 200,
- "Char": "a",
- "Timestamp": 1422172800
- },
- "response": {
- "status_code": 200,
- "headers": {
- "ImaHeader": "test",
- "X-Foo": "abc"
- },
- "body": "<OperationNameResponse><Str>myname</Str><FooNum>123</FooNum><FalseBool>false</FalseBool><TrueBool>true</TrueBool><Float>1.2</Float><Double>1.3</Double><Long>200</Long><Char>a</Char><Timestamp>2015-01-25T08:00:00Z</Timestamp></OperationNameResponse>"
- }
- },
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "ImaHeader": "test",
- "ImaHeaderLocation": "abc",
- "Str": "",
- "Num": 123,
- "FalseBool": false,
- "TrueBool": true,
- "Float": 1.2,
- "Double": 1.3,
- "Long": 200,
- "Char": "a",
- "Timestamp": 1422172800
- },
- "response": {
- "status_code": 200,
- "headers": {
- "ImaHeader": "test",
- "X-Foo": "abc"
- },
- "body": "<OperationNameResponse><Str></Str><FooNum>123</FooNum><FalseBool>false</FalseBool><TrueBool>true</TrueBool><Float>1.2</Float><Double>1.3</Double><Long>200</Long><Char>a</Char><Timestamp>2015-01-25T08:00:00Z</Timestamp></OperationNameResponse>"
- }
- }
- ]
- },
- {
- "description": "Blob",
- "metadata": {
- "protocol": "rest-xml"
- },
- "shapes": {
- "OutputShape": {
- "type": "structure",
- "members": {
- "Blob": {
- "shape": "BlobType"
- }
- }
- },
- "BlobType": {
- "type": "blob"
- }
- },
- "cases": [
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "Blob": "value"
- },
- "response": {
- "status_code": 200,
- "headers": {},
- "body": "<OperationNameResult><Blob>dmFsdWU=</Blob></OperationNameResult>"
- }
- }
- ]
- },
- {
- "description": "Lists",
- "metadata": {
- "protocol": "rest-xml"
- },
- "shapes": {
- "OutputShape": {
- "type": "structure",
- "members": {
- "ListMember": {
- "shape": "ListShape"
- }
- }
- },
- "ListShape": {
- "type": "list",
- "member": {
- "shape": "StringType"
- }
- },
- "StringType": {
- "type": "string"
- }
- },
- "cases": [
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "ListMember": ["abc", "123"]
- },
- "response": {
- "status_code": 200,
- "headers": {},
- "body": "<OperationNameResult><ListMember><member>abc</member><member>123</member></ListMember></OperationNameResult>"
- }
- }
- ]
- },
- {
- "description": "List with custom member name",
- "metadata": {
- "protocol": "rest-xml"
- },
- "shapes": {
- "OutputShape": {
- "type": "structure",
- "members": {
- "ListMember": {
- "shape": "ListShape"
- }
- }
- },
- "ListShape": {
- "type": "list",
- "member": {
- "shape": "StringType",
- "locationName": "item"
- }
- },
- "StringType": {
- "type": "string"
- }
- },
- "cases": [
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "ListMember": ["abc", "123"]
- },
- "response": {
- "status_code": 200,
- "headers": {},
- "body": "<OperationNameResult><ListMember><item>abc</item><item>123</item></ListMember></OperationNameResult>"
- }
- }
- ]
- },
- {
- "description": "Flattened List",
- "metadata": {
- "protocol": "rest-xml"
- },
- "shapes": {
- "OutputShape": {
- "type": "structure",
- "members": {
- "ListMember": {
- "shape": "StringList",
- "flattened": true
- }
- }
- },
- "StringList": {
- "type": "list",
- "member": {
- "shape": "StringType"
- }
- },
- "StringType": {
- "type": "string"
- }
- },
- "cases": [
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "ListMember": ["abc", "123"]
- },
- "response": {
- "status_code": 200,
- "headers": {},
- "body": "<OperationNameResult><ListMember>abc</ListMember><ListMember>123</ListMember></OperationNameResult>"
- }
- }
- ]
- },
- {
- "description": "Normal map",
- "metadata": {
- "protocol": "rest-xml"
- },
- "shapes": {
- "OutputShape": {
- "type": "structure",
- "members": {
- "Map": {
- "shape": "StringMap"
- }
- }
- },
- "StringMap": {
- "type": "map",
- "key": {
- "shape": "StringType"
- },
- "value": {
- "shape": "SingleStructure"
- }
- },
- "SingleStructure": {
- "type": "structure",
- "members": {
- "foo": {
- "shape": "StringType"
- }
- }
- },
- "StringType": {
- "type": "string"
- }
- },
- "cases": [
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "Map": {
- "qux": {
- "foo": "bar"
- },
- "baz": {
- "foo": "bam"
- }
- }
- },
- "response": {
- "status_code": 200,
- "headers": {},
- "body": "<OperationNameResult><Map><entry><key>qux</key><value><foo>bar</foo></value></entry><entry><key>baz</key><value><foo>bam</foo></value></entry></Map></OperationNameResult>"
- }
- }
- ]
- },
- {
- "description": "Flattened map",
- "metadata": {
- "protocol": "rest-xml"
- },
- "shapes": {
- "OutputShape": {
- "type": "structure",
- "members": {
- "Map": {
- "shape": "StringMap",
- "flattened": true
- }
- }
- },
- "StringMap": {
- "type": "map",
- "key": {
- "shape": "StringType"
- },
- "value": {
- "shape": "StringType"
- }
- },
- "StringType": {
- "type": "string"
- }
- },
- "cases": [
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "Map": {
- "qux": "bar",
- "baz": "bam"
- }
- },
- "response": {
- "status_code": 200,
- "headers": {},
- "body": "<OperationNameResult><Map><key>qux</key><value>bar</value></Map><Map><key>baz</key><value>bam</value></Map></OperationNameResult>"
- }
- }
- ]
- },
- {
- "description": "Named map",
- "metadata": {
- "protocol": "rest-xml"
- },
- "shapes": {
- "OutputShape": {
- "type": "structure",
- "members": {
- "Map": {
- "shape": "StringMap"
- }
- }
- },
- "StringMap": {
- "type": "map",
- "key": {
- "shape": "StringType",
- "locationName": "foo"
- },
- "value": {
- "shape": "StringType",
- "locationName": "bar"
- }
- },
- "StringType": {
- "type": "string"
- }
- },
- "cases": [
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "Map": {
- "qux": "bar",
- "baz": "bam"
- }
- },
- "response": {
- "status_code": 200,
- "headers": {},
- "body": "<OperationNameResult><Map><entry><foo>qux</foo><bar>bar</bar></entry><entry><foo>baz</foo><bar>bam</bar></entry></Map></OperationNameResult>"
- }
- }
- ]
- },
- {
- "description": "XML payload",
- "metadata": {
- "protocol": "rest-xml"
- },
- "shapes": {
- "OutputShape": {
- "type": "structure",
- "payload": "Data",
- "members": {
- "Header": {
- "shape": "StringType",
- "location": "header",
- "locationName": "X-Foo"
- },
- "Data": {
- "shape": "SingleStructure"
- }
- }
- },
- "StringType": {
- "type": "string"
- },
- "SingleStructure": {
- "type": "structure",
- "members": {
- "Foo": {
- "shape": "StringType"
- }
- }
- }
- },
- "cases": [
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "Header": "baz",
- "Data": {
- "Foo": "abc"
- }
- },
- "response": {
- "status_code": 200,
- "headers": {
- "X-Foo": "baz"
- },
- "body": "<OperationNameResponse><Foo>abc</Foo></OperationNameResponse>"
- }
- }
- ]
- },
- {
- "description": "Streaming payload",
- "metadata": {
- "protocol": "rest-xml"
- },
- "shapes": {
- "OutputShape": {
- "type": "structure",
- "payload": "Stream",
- "members": {
- "Stream": {
- "shape": "BlobStream"
- }
- }
- },
- "BlobStream": {
- "type": "blob"
- }
- },
- "cases": [
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "Stream": "abc"
- },
- "response": {
- "status_code": 200,
- "headers": {},
- "body": "abc"
- }
- }
- ]
- },
- {
- "description": "Scalar members in headers",
- "metadata": {
- "protocol": "rest-xml"
- },
- "shapes": {
- "OutputShape": {
- "type": "structure",
- "members": {
- "Str": {
- "locationName": "x-str",
- "shape": "StringHeaderType"
- },
- "Integer": {
- "locationName": "x-int",
- "shape": "IntegerHeaderType"
- },
- "TrueBool": {
- "locationName": "x-true-bool",
- "shape": "BooleanHeaderType"
- },
- "FalseBool": {
- "locationName": "x-false-bool",
- "shape": "BooleanHeaderType"
- },
- "Float": {
- "locationName": "x-float",
- "shape": "FloatHeaderType"
- },
- "Double": {
- "locationName": "x-double",
- "shape": "DoubleHeaderType"
- },
- "Long": {
- "locationName": "x-long",
- "shape": "LongHeaderType"
- },
- "Char": {
- "locationName": "x-char",
- "shape": "CharHeaderType"
- },
- "Timestamp": {
- "locationName": "x-timestamp",
- "shape": "TimestampHeaderType"
- }
- }
- },
- "StringHeaderType": {
- "location": "header",
- "type": "string"
- },
- "IntegerHeaderType": {
- "location": "header",
- "type": "integer"
- },
- "BooleanHeaderType": {
- "location": "header",
- "type": "boolean"
- },
- "FloatHeaderType": {
- "location": "header",
- "type": "float"
- },
- "DoubleHeaderType": {
- "location": "header",
- "type": "double"
- },
- "LongHeaderType": {
- "location": "header",
- "type": "long"
- },
- "CharHeaderType": {
- "location": "header",
- "type": "character"
- },
- "TimestampHeaderType": {
- "location": "header",
- "type": "timestamp"
- }
- },
- "cases": [
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "Str": "string",
- "Integer": 1,
- "TrueBool": true,
- "FalseBool": false,
- "Float": 1.5,
- "Double": 1.5,
- "Long": 100,
- "Char": "a",
- "Timestamp": 1422172800
- },
- "response": {
- "status_code": 200,
- "headers": {
- "x-str": "string",
- "x-int": "1",
- "x-true-bool": "true",
- "x-false-bool": "false",
- "x-float": "1.5",
- "x-double": "1.5",
- "x-long": "100",
- "x-char": "a",
- "x-timestamp": "Sun, 25 Jan 2015 08:00:00 GMT"
- },
- "body": ""
- }
- }
- ]
- },
- {
- "description": "Empty string",
- "metadata": {
- "protocol": "rest-xml"
- },
- "shapes": {
- "OutputShape": {
- "type": "structure",
- "members": {
- "Foo": {
- "shape": "StringType"
- }
- }
- },
- "StringType": {
- "type": "string"
- }
- },
- "cases": [
- {
- "given": {
- "output": {
- "shape": "OutputShape"
- },
- "name": "OperationName"
- },
- "result": {
- "Foo": ""
- },
- "response": {
- "status_code": 200,
- "headers": {},
- "body": "<OperationNameResponse><Foo/><RequestId>requestid</RequestId></OperationNameResponse>"
- }
- }
- ]
- }
- ]
|