change github.com/aws/aws-sdk-go to be the same revision in kubernetes

This commit is contained in:
Jingfang Liu
2018-10-16 09:34:22 -07:00
parent e0958159f3
commit c6a78cee92
462 changed files with 20605 additions and 85780 deletions

View File

@@ -270,7 +270,7 @@ func (i *testCase) TestCase(idx int) string {
case "rest-xml":
i.InputTest.Body = util.SortXML(bytes.NewReader([]byte(i.InputTest.Body)))
case "json", "rest-json":
i.InputTest.Body = i.InputTest.Body
i.InputTest.Body = strings.Replace(i.InputTest.Body, " ", "", -1)
}
jsonValues := buildJSONValues(i.Given.InputRef.Shape)
@@ -518,10 +518,6 @@ func getType(t string) uint {
}
func main() {
if len(os.Getenv("AWS_SDK_CODEGEN_DEBUG")) != 0 {
api.LogDebug(os.Stdout)
}
fmt.Println("Generating test suite", os.Args[1:])
out := generateTestSuite(os.Args[1])
if len(os.Args) == 3 {

View File

@@ -147,19 +147,55 @@
"InputShape": {
"type": "structure",
"members": {
"ListArg": {
"shape": "ListType"
"ListStrings": {
"shape": "ListStringType"
},
"ListBools": {
"shape": "ListBoolType"
},
"ListFloats": {
"shape": "ListFloatType"
},
"ListIntegers": {
"shape": "ListIntegerType"
}
}
},
"ListType": {
"ListStringType": {
"type": "list",
"member": {
"shape": "Strings"
"shape": "StringType"
}
},
"Strings": {
"ListBoolType": {
"type": "list",
"member": {
"shape": "BoolType"
}
},
"ListFloatType": {
"type": "list",
"member": {
"shape": "FloatType"
}
},
"ListIntegerType": {
"type": "list",
"member": {
"shape": "IntegerType"
}
},
"StringType": {
"type": "string"
},
"BoolType": {
"type": "boolean"
},
"FloatType": {
"type": "float"
},
"IntegerType": {
"type": "integer"
}
},
"cases": [
@@ -171,15 +207,30 @@
"name": "OperationName"
},
"params": {
"ListArg": [
"ListStrings": [
"foo",
"bar",
"baz"
],
"ListBools": [
true,
false,
false
],
"ListFloats": [
1.1,
2.718,
3.14
],
"ListIntegers": [
0,
1,
2
]
},
"serialized": {
"uri": "/",
"body": "Action=OperationName&Version=2014-01-01&ListArg.1=foo&ListArg.2=bar&ListArg.3=baz"
"body": "Action=OperationName&Version=2014-01-01&ListStrings.1=foo&ListStrings.2=bar&ListStrings.3=baz&ListBools.1=true&ListBools.2=false&ListBools.3=false&ListFloats.1=1.1&ListFloats.2=2.718&ListFloats.3=3.14&ListIntegers.1=0&ListIntegers.2=1&ListIntegers.3=2"
}
}
]
@@ -332,20 +383,9 @@
"members": {
"TimeArg": {
"shape": "TimestampType"
},
"TimeCustom": {
"timestampFormat": "unixTimestamp",
"shape": "TimestampType"
},
"TimeFormat": {
"shape": "TimestampFormatType"
}
}
},
"TimestampFormatType": {
"timestampFormat": "unixTimestamp",
"type": "timestamp"
},
"TimestampType": {
"type": "timestamp"
}
@@ -359,13 +399,11 @@
"name": "OperationName"
},
"params": {
"TimeArg": 1422172800,
"TimeCustom": 1422172800,
"TimeFormat": 1422172800
"TimeArg": 1422172800
},
"serialized": {
"uri": "/",
"body": "Action=OperationName&Version=2014-01-01&TimeArg=2015-01-25T08%3A00%3A00Z&TimeCustom=1422172800&TimeFormat=1422172800"
"body": "Action=OperationName&Version=2014-01-01&TimeArg=2015-01-25T08%3A00%3A00Z"
}
}
]
@@ -382,7 +420,7 @@
"members": {
"Token": {
"shape": "StringType",
"idempotencyToken": true
"idempotencyToken": true
}
}
},

View File

@@ -57,20 +57,9 @@
"members": {
"TimeArg": {
"shape": "TimestampType"
},
"TimeCustom": {
"timestampFormat": "rfc822",
"shape": "TimestampType"
},
"TimeFormat": {
"shape": "TimestampFormatType"
}
}
},
"TimestampFormatType": {
"timestampFormat": "rfc822",
"type": "timestamp"
},
"TimestampType": {
"type": "timestamp"
}
@@ -84,12 +73,10 @@
"name": "OperationName"
},
"params": {
"TimeArg": 1422172800,
"TimeCustom": 1422172800,
"TimeFormat": 1422172800
"TimeArg": 1422172800
},
"serialized": {
"body": "{\"TimeArg\": 1422172800, \"TimeCustom\": \"Sun, 25 Jan 2015 08:00:00 GMT\", \"TimeFormat\": \"Sun, 25 Jan 2015 08:00:00 GMT\"}",
"body": "{\"TimeArg\": 1422172800}",
"headers": {
"X-Amz-Target": "com.amazonaws.foo.OperationName",
"Content-Type": "application/x-amz-json-1.1"
@@ -114,7 +101,7 @@
"shape": "BlobType"
},
"BlobMap": {
"shape": "BlobMapType"
"shape": "BlobMapType"
}
}
},
@@ -159,8 +146,8 @@
},
"params": {
"BlobMap": {
"key1": "foo",
"key2": "bar"
"key1": "foo",
"key2": "bar"
}
},
"serialized": {
@@ -193,7 +180,7 @@
"ListOfStructures": {
"type": "list",
"member": {
"shape": "BlobType"
"shape": "BlobType"
}
},
"BlobType": {
@@ -217,10 +204,8 @@
"serialized": {
"body": "{\"ListParam\": [\"Zm9v\", \"YmFy\"]}",
"uri": "/",
"headers": {
"X-Amz-Target": "com.amazonaws.foo.OperationName",
"Content-Type": "application/x-amz-json-1.1"
}
"headers": {"X-Amz-Target": "com.amazonaws.foo.OperationName",
"Content-Type": "application/x-amz-json-1.1"}
}
}
]
@@ -503,7 +488,7 @@
"members": {
"Token": {
"shape": "StringType",
"idempotencyToken": true
"idempotencyToken": true
}
}
},

View File

@@ -563,18 +563,18 @@
"InputShape": {
"type": "structure",
"members": {
"BlobArgs": {
"shape": "BlobsType"
}
"BlobArgs": {
"shape": "BlobsType"
}
}
},
"BlobsType": {
"BlobsType": {
"type": "list",
"member": {
"shape": "BlobType"
},
"flattened": true
},
},
"BlobType": {
"type": "blob"
}
@@ -609,20 +609,9 @@
"members": {
"TimeArg": {
"shape": "TimestampType"
},
"TimeCustom": {
"timestampFormat": "unixTimestamp",
"shape": "TimestampType"
},
"TimeFormat": {
"shape": "TimestampFormatType"
}
}
},
"TimestampFormatType": {
"timestampFormat": "unixTimestamp",
"type": "timestamp"
},
"TimestampType": {
"type": "timestamp"
}
@@ -636,13 +625,11 @@
"name": "OperationName"
},
"params": {
"TimeArg": 1422172800,
"TimeCustom": 1422172800,
"TimeFormat": 1422172800
"TimeArg": 1422172800
},
"serialized": {
"uri": "/",
"body": "Action=OperationName&Version=2014-01-01&TimeArg=2015-01-25T08%3A00%3A00Z&TimeCustom=1422172800&TimeFormat=1422172800"
"body": "Action=OperationName&Version=2014-01-01&TimeArg=2015-01-25T08%3A00%3A00Z"
}
}
]
@@ -846,7 +833,7 @@
"members": {
"Token": {
"shape": "StringType",
"idempotencyToken": true
"idempotencyToken": true
}
}
},

View File

@@ -677,7 +677,7 @@
}
]
},
{
{
"description": "Blob payload",
"metadata": {
"protocol": "rest-json",
@@ -1103,51 +1103,9 @@
"shape": "TimestampType",
"location": "header",
"locationName": "x-amz-timearg"
},
"TimeArgInQuery": {
"shape": "TimestampType",
"location": "querystring",
"locationName": "TimeQuery"
},
"TimeCustom": {
"timestampFormat": "iso8601",
"shape": "TimestampType"
},
"TimeCustomInHeader": {
"timestampFormat": "unixTimestamp",
"shape": "TimestampType",
"location": "header",
"locationName": "x-amz-timecustom-header"
},
"TimeCustomInQuery": {
"timestampFormat": "unixTimestamp",
"shape": "TimestampType",
"location": "querystring",
"locationName": "TimeCustomQuery"
},
"TimeFormat": {
"shape": "TimestampFormatRfcType"
},
"TimeFormatInHeader": {
"shape": "TimestampFormatUnixType",
"location": "header",
"locationName": "x-amz-timeformat-header"
},
"TimeFormatInQuery": {
"shape": "TimestampFormatUnixType",
"location": "querystring",
"locationName": "TimeFormatQuery"
}
}
},
"TimestampFormatRfcType": {
"timestampFormat": "rfc822",
"type": "timestamp"
},
"TimestampFormatUnixType": {
"timestampFormat": "unixTimestamp",
"type": "timestamp"
},
"TimestampType": {
"type": "timestamp"
}
@@ -1165,24 +1123,32 @@
"name": "OperationName"
},
"params": {
"TimeArg": 1422172800,
"TimeArgInQuery": 1422172800,
"TimeArgInHeader": 1422172800,
"TimeCustom": 1422172800,
"TimeCustomInQuery": 1422172800,
"TimeCustomInHeader": 1422172800,
"TimeFormat": 1422172800,
"TimeFormatInQuery": 1422172800,
"TimeFormatInHeader": 1422172800
"TimeArg": 1422172800
},
"serialized": {
"uri": "/path?TimeQuery=2015-01-25T08%3A00%3A00Z&TimeCustomQuery=1422172800&TimeFormatQuery=1422172800",
"headers": {
"x-amz-timearg": "Sun, 25 Jan 2015 08:00:00 GMT",
"x-amz-timecustom-header": "1422172800",
"x-amz-timeformat-header": "1422172800"
"uri": "/path",
"headers": {},
"body": "{\"TimeArg\": 1422172800}"
}
},
{
"given": {
"input": {
"shape": "InputShape"
},
"body": "{\"TimeArg\": 1422172800, \"TimeCustom\": \"2015-01-25T08:00:00Z\", \"TimeFormat\": \"Sun, 25 Jan 2015 08:00:00 GMT\"}"
"http": {
"method": "POST",
"requestUri": "/path"
},
"name": "OperationName"
},
"params": {
"TimeArgInHeader": 1422172800
},
"serialized": {
"uri": "/path",
"headers": {"x-amz-timearg": "Sun, 25 Jan 2015 08:00:00 GMT"},
"body": ""
}
}
]
@@ -1285,7 +1251,7 @@
"members": {
"Token": {
"shape": "StringType",
"idempotencyToken": true
"idempotencyToken": true
}
}
},
@@ -1431,7 +1397,7 @@
"body": "{\"BodyListField\":[\"{\\\"Foo\\\":\\\"Bar\\\"}\"]}"
}
},
{
{
"given": {
"input": {
"shape": "InputShape"

View File

@@ -599,7 +599,7 @@
]
},
{
"description": "Blob shapes",
"description": "Blob and timestamp shapes",
"metadata": {
"protocol": "rest-xml",
"apiVersion": "2014-01-01"
@@ -616,11 +616,17 @@
"StructureShape": {
"type": "structure",
"members": {
"t": {
"shape": "TShape"
},
"b": {
"shape": "BShape"
}
}
},
"TShape": {
"type": "timestamp"
},
"BShape": {
"type": "blob"
}
@@ -641,122 +647,19 @@
},
"params": {
"StructureParam": {
"t": 1422172800,
"b": "foo"
}
},
"serialized": {
"method": "POST",
"body": "<OperationRequest xmlns=\"https://foo/\"><StructureParam><b>Zm9v</b></StructureParam></OperationRequest>",
"body": "<OperationRequest xmlns=\"https://foo/\"><StructureParam><t>2015-01-25T08:00:00Z</t><b>Zm9v</b></StructureParam></OperationRequest>",
"uri": "/2014-01-01/hostedzone",
"headers": {}
}
}
]
},
{
"description": "Timestamp shapes",
"metadata": {
"protocol": "rest-xml",
"apiVersion": "2014-01-01"
},
"shapes": {
"InputShape": {
"type": "structure",
"members": {
"TimeArg": {
"shape": "TimestampType"
},
"TimeArgInHeader": {
"shape": "TimestampType",
"location": "header",
"locationName": "x-amz-timearg"
},
"TimeArgInQuery": {
"shape": "TimestampType",
"location": "querystring",
"locationName": "TimeQuery"
},
"TimeCustom": {
"timestampFormat": "rfc822",
"shape": "TimestampType"
},
"TimeCustomInHeader": {
"timestampFormat": "unixTimestamp",
"shape": "TimestampType",
"location": "header",
"locationName": "x-amz-timecustom-header"
},
"TimeCustomInQuery": {
"timestampFormat": "unixTimestamp",
"shape": "TimestampType",
"location": "querystring",
"locationName": "TimeCustomQuery"
},
"TimeFormat": {
"shape": "TimestampFormatRfcType"
},
"TimeFormatInHeader": {
"shape": "TimestampFormatUnixType",
"location": "header",
"locationName": "x-amz-timeformat-header"
},
"TimeFormatInQuery": {
"shape": "TimestampFormatUnixType",
"location": "querystring",
"locationName": "TimeFormatQuery"
}
}
},
"TimestampFormatRfcType": {
"timestampFormat": "rfc822",
"type": "timestamp"
},
"TimestampFormatUnixType": {
"timestampFormat": "unixTimestamp",
"type": "timestamp"
},
"TimestampType": {
"type": "timestamp"
}
},
"cases": [
{
"given": {
"http": {
"method": "POST",
"requestUri": "/2014-01-01/hostedzone"
},
"input": {
"shape": "InputShape",
"locationName": "TimestampStructure",
"xmlNamespace": {"uri": "https://foo/"}
},
"name": "OperationName"
},
"params": {
"TimeArg": 1422172800,
"TimeArgInQuery": 1422172800,
"TimeArgInHeader": 1422172800,
"TimeCustom": 1422172800,
"TimeCustomInQuery": 1422172800,
"TimeCustomInHeader": 1422172800,
"TimeFormat": 1422172800,
"TimeFormatInQuery": 1422172800,
"TimeFormatInHeader": 1422172800
},
"serialized": {
"method": "POST",
"body": "<TimestampStructure xmlns=\"https://foo/\"><TimeArg>2015-01-25T08:00:00Z</TimeArg><TimeCustom>Sun, 25 Jan 2015 08:00:00 GMT</TimeCustom><TimeFormat>Sun, 25 Jan 2015 08:00:00 GMT</TimeFormat></TimestampStructure>",
"uri": "/2014-01-01/hostedzone?TimeQuery=2015-01-25T08%3A00%3A00Z&TimeCustomQuery=1422172800&TimeFormatQuery=1422172800",
"headers": {
"x-amz-timearg": "Sun, 25 Jan 2015 08:00:00 GMT",
"x-amz-timecustom-header": "1422172800",
"x-amz-timeformat-header": "1422172800"
}
}
}
]
},
{
"description": "Header maps",
"metadata": {
@@ -1302,21 +1205,21 @@
}
},
"Grantee": {
"type": "structure",
"members": {
"Type": {
"shape": "Type",
"locationName": "xsi:type",
"xmlAttribute": true
},
"EmailAddress": {
"shape": "StringType"
}
},
"xmlNamespace": {
"prefix": "xsi",
"uri":"http://www.w3.org/2001/XMLSchema-instance"
}
"type": "structure",
"members": {
"Type": {
"shape": "Type",
"locationName": "xsi:type",
"xmlAttribute": true
},
"EmailAddress": {
"shape": "StringType"
}
},
"xmlNamespace": {
"prefix": "xsi",
"uri":"http://www.w3.org/2001/XMLSchema-instance"
}
},
"Type": {
"type": "string"
@@ -1683,6 +1586,51 @@
}
]
},
{
"description": "Timestamp in header",
"metadata": {
"protocol": "rest-xml",
"apiVersion": "2014-01-01"
},
"shapes": {
"InputShape": {
"type": "structure",
"members": {
"TimeArgInHeader": {
"shape": "TimestampType",
"location": "header",
"locationName": "x-amz-timearg"
}
}
},
"TimestampType": {
"type": "timestamp"
}
},
"cases": [
{
"given": {
"input": {
"shape": "InputShape"
},
"http": {
"method": "POST",
"requestUri": "/path"
},
"name": "OperationName"
},
"params": {
"TimeArgInHeader": 1422172800
},
"serialized": {
"method": "POST",
"body": "",
"uri": "/path",
"headers": {"x-amz-timearg": "Sun, 25 Jan 2015 08:00:00 GMT"}
}
}
]
},
{
"description": "Idempotency token auto fill",
"metadata": {
@@ -1695,7 +1643,7 @@
"members": {
"Token": {
"shape": "StringType",
"idempotencyToken": true
"idempotencyToken": true
}
}
},

View File

@@ -452,7 +452,7 @@
]
},
{
"description": "Timestamp members",
"description": "Enum output",
"metadata": {
"protocol": "ec2"
},
@@ -460,38 +460,24 @@
"OutputShape": {
"type": "structure",
"members": {
"TimeArg": {
"shape": "TimestampType"
"FooEnum": {
"shape": "EC2EnumType"
},
"TimeCustom": {
"timestampFormat": "rfc822",
"shape": "TimestampType"
},
"TimeFormat": {
"shape": "TimestampFormatType"
},
"StructMember": {
"shape": "TimeContainer"
"ListEnums": {
"shape": "EC2EnumList"
}
}
},
"TimeContainer": {
"type": "structure",
"members": {
"foo": {
"shape": "TimestampType"
},
"bar": {
"shape": "TimestampFormatType"
}
}
"EC2EnumType":{
"type":"string",
"enum":[
"foo",
"bar"
]
},
"TimestampFormatType": {
"timestampFormat": "unixTimestamp",
"type": "timestamp"
},
"TimestampType": {
"type": "timestamp"
"EC2EnumList":{
"type":"list",
"member": {"shape": "EC2EnumType"}
}
},
"cases": [
@@ -503,18 +489,13 @@
"name": "OperationName"
},
"result": {
"TimeArg": 1398796238,
"TimeCustom": 1398796238,
"TimeFormat": 1398796238,
"StructMember": {
"foo": 1398796238,
"bar": 1398796238
}
"FooEnum": "foo",
"ListEnums": ["foo", "bar"]
},
"response": {
"status_code": 200,
"headers": {},
"body": "<OperationNameResponse><StructMember><foo>2014-04-29T18:30:38Z</foo><bar>1398796238</bar></StructMember><TimeArg>2014-04-29T18:30:38Z</TimeArg><TimeCustom>Tue, 29 Apr 2014 18:30:38 GMT</TimeCustom><TimeFormat>1398796238</TimeFormat><RequestId>requestid</RequestId></OperationNameResponse>"
"body": "<OperationNameResponse><FooEnum>foo</FooEnum><ListEnums><member>foo</member><member>bar</member></ListEnums></OperationNameResponse>"
}
}
]

View File

@@ -142,38 +142,24 @@
"OutputShape": {
"type": "structure",
"members": {
"TimeArg": {
"shape": "TimestampType"
},
"TimeCustom": {
"timestampFormat": "rfc822",
"shape": "TimestampType"
},
"TimeFormat": {
"shape": "TimestampFormatType"
"TimeMember": {
"shape": "TimeType"
},
"StructMember": {
"shape": "TimeContainer"
}
}
},
"TimeType": {
"type": "timestamp"
},
"TimeContainer": {
"type": "structure",
"members": {
"foo": {
"shape": "TimestampType"
},
"bar": {
"shape": "TimestampFormatType"
"shape": "TimeType"
}
}
},
"TimestampFormatType": {
"timestampFormat": "iso8601",
"type": "timestamp"
},
"TimestampType": {
"type": "timestamp"
}
},
"cases": [
@@ -185,18 +171,15 @@
"name": "OperationName"
},
"result": {
"TimeArg": 1398796238,
"TimeCustom": 1398796238,
"TimeFormat": 1398796238,
"TimeMember": 1398796238,
"StructMember": {
"foo": 1398796238,
"bar": 1398796238
"foo": 1398796238
}
},
"response": {
"status_code": 200,
"headers": {},
"body": "{\"TimeArg\": 1398796238, \"TimeCustom\": \"Tue, 29 Apr 2014 18:30:38 GMT\", \"TimeFormat\": \"2014-04-29T18:30:38Z\", \"StructMember\": {\"foo\": 1398796238, \"bar\": \"2014-04-29T18:30:38Z\"}}"
"body": "{\"TimeMember\": 1398796238, \"StructMember\": {\"foo\": 1398796238}}"
}
}
]
@@ -413,11 +396,11 @@
}
},
"cases": [
{
{
"given": {
"output": {
"shape": "OutputShape"
},
},
"name": "OperationName"
},
"result": {

View File

@@ -774,7 +774,7 @@
]
},
{
"description": "Timestamp members",
"description": "Enum output",
"metadata": {
"protocol": "query"
},
@@ -782,38 +782,24 @@
"OutputShape": {
"type": "structure",
"members": {
"TimeArg": {
"shape": "TimestampType"
"FooEnum": {
"shape": "EC2EnumType"
},
"TimeCustom": {
"timestampFormat": "rfc822",
"shape": "TimestampType"
},
"TimeFormat": {
"shape": "TimestampFormatType"
},
"StructMember": {
"shape": "TimeContainer"
"ListEnums": {
"shape": "EC2EnumList"
}
}
},
"TimeContainer": {
"type": "structure",
"members": {
"foo": {
"shape": "TimestampType"
},
"bar": {
"shape": "TimestampFormatType"
}
}
"EC2EnumType":{
"type":"string",
"enum":[
"foo",
"bar"
]
},
"TimestampFormatType": {
"timestampFormat": "unixTimestamp",
"type": "timestamp"
},
"TimestampType": {
"type": "timestamp"
"EC2EnumList":{
"type":"list",
"member": {"shape": "EC2EnumType"}
}
},
"cases": [
@@ -825,18 +811,13 @@
"name": "OperationName"
},
"result": {
"TimeArg": 1398796238,
"TimeCustom": 1398796238,
"TimeFormat": 1398796238,
"StructMember": {
"foo": 1398796238,
"bar": 1398796238
}
"FooEnum": "foo",
"ListEnums": ["foo", "bar"]
},
"response": {
"status_code": 200,
"headers": {},
"body": "<OperationNameResponse><StructMember><foo>2014-04-29T18:30:38Z</foo><bar>1398796238</bar></StructMember><TimeArg>2014-04-29T18:30:38Z</TimeArg><TimeCustom>Tue, 29 Apr 2014 18:30:38 GMT</TimeCustom><TimeFormat>1398796238</TimeFormat><RequestId>requestid</RequestId></OperationNameResponse>"
"body": "<OperationNameResponse><FooEnum>foo</FooEnum><ListEnums><member>foo</member><member>bar</member></ListEnums></OperationNameResponse>"
}
}
]

View File

@@ -166,54 +166,24 @@
"OutputShape": {
"type": "structure",
"members": {
"TimeArg": {
"shape": "TimestampType"
},
"TimeArgInHeader": {
"shape": "TimestampType",
"location": "header",
"locationName": "x-amz-timearg"
},
"TimeCustom": {
"timestampFormat": "rfc822",
"shape": "TimestampType"
},
"TimeCustomInHeader": {
"timestampFormat": "unixTimestamp",
"shape": "TimestampType",
"location": "header",
"locationName": "x-amz-timecustom"
},
"TimeFormat": {
"shape": "TimestampFormatType"
},
"TimeFormatInHeader": {
"shape": "TimestampFormatType",
"location": "header",
"locationName": "x-amz-timeformat"
"TimeMember": {
"shape": "TimeType"
},
"StructMember": {
"shape": "TimeContainer"
}
}
},
"TimeType": {
"type": "timestamp"
},
"TimeContainer": {
"type": "structure",
"members": {
"foo": {
"shape": "TimestampType"
},
"bar": {
"shape": "TimestampFormatType"
"shape": "TimeType"
}
}
},
"TimestampFormatType": {
"timestampFormat": "iso8601",
"type": "timestamp"
},
"TimestampType": {
"type": "timestamp"
}
},
"cases": [
@@ -225,25 +195,15 @@
"name": "OperationName"
},
"result": {
"TimeArg": 1398796238,
"TimeArgInHeader": 1398796238,
"TimeCustom": 1398796238,
"TimeCustomInHeader": 1398796238,
"TimeFormat": 1398796238,
"TimeFormatInHeader": 1398796238,
"TimeMember": 1398796238,
"StructMember": {
"foo": 1398796238,
"bar": 1398796238
"foo": 1398796238
}
},
"response": {
"status_code": 200,
"headers": {
"x-amz-timearg": "Tue, 29 Apr 2014 18:30:38 GMT",
"x-amz-timecustom": "1398796238",
"x-amz-timeformat": "2014-04-29T18:30:38Z"
},
"body": "{\"TimeArg\": 1398796238, \"TimeCustom\": \"Tue, 29 Apr 2014 18:30:38 GMT\", \"TimeFormat\": \"2014-04-29T18:30:38Z\", \"StructMember\": {\"foo\": 1398796238, \"bar\": \"2014-04-29T18:30:38Z\"}}"
"headers": {},
"body": "{\"TimeMember\": 1398796238, \"StructMember\": {\"foo\": 1398796238}}"
}
}
]
@@ -713,6 +673,21 @@
"headers": {},
"body": "{\"BodyListField\":[\"{\\\"Foo\\\":\\\"Bar\\\"}\"]}"
}
},
{
"given": {
"output": {
"shape": "OutputShape"
},
"name": "OperationName"
},
"result": {
},
"response": {
"status_code": 200,
"headers": {},
"body": ""
}
}
]
},

View File

@@ -42,6 +42,12 @@
},
"Timestamp": {
"shape": "TimestampType"
},
"Blobs": {
"shape": "Blobs"
},
"Timestamps": {
"shape": "Timestamps"
}
}
},
@@ -76,6 +82,17 @@
},
"TimestampType": {
"type": "timestamp"
},
"BlobType": {
"type": "blob"
},
"Blobs": {
"type":"list",
"member":{"shape":"BlobType"}
},
"Timestamps":{
"type":"list",
"member":{"shape":"TimestampType"}
}
},
"cases": [
@@ -136,6 +153,23 @@
},
"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>"
}
},
{
"given": {
"output": {
"shape": "OutputShape"
},
"name": "OperationName"
},
"result": {
"Blobs": ["value", "value2"],
"Timestamps": [1422172800, 1422172801]
},
"response": {
"status_code": 200,
"headers": {},
"body": "<OperationNameResponse><Blobs><member>dmFsdWU=</member><member>dmFsdWUy</member></Blobs><Timestamps><member>2015-01-25T08:00:00Z</member><member>2015-01-25T08:00:01Z</member></Timestamps></OperationNameResponse>"
}
}
]
},
@@ -718,7 +752,7 @@
]
},
{
"description": "Timestamp members",
"description": "Enum",
"metadata": {
"protocol": "rest-xml"
},
@@ -726,54 +760,31 @@
"OutputShape": {
"type": "structure",
"members": {
"TimeArg": {
"shape": "TimestampType"
},
"TimeArgInHeader": {
"shape": "TimestampType",
"HeaderEnum": {
"shape": "RESTJSONEnumType",
"location": "header",
"locationName": "x-amz-timearg"
"locationName": "x-amz-enum"
},
"TimeCustom": {
"timestampFormat": "rfc822",
"shape": "TimestampType"
"FooEnum": {
"shape": "RESTJSONEnumType"
},
"TimeCustomInHeader": {
"timestampFormat": "unixTimestamp",
"shape": "TimestampType",
"location": "header",
"locationName": "x-amz-timecustom"
},
"TimeFormat": {
"shape": "TimestampFormatType"
},
"TimeFormatInHeader": {
"shape": "TimestampFormatType",
"location": "header",
"locationName": "x-amz-timeformat"
},
"StructMember": {
"shape": "TimeContainer"
"ListEnums": {
"shape": "EnumList"
}
}
},
"TimeContainer": {
"type": "structure",
"members": {
"foo": {
"shape": "TimestampType"
},
"bar": {
"shape": "TimestampFormatType"
}
}
"RESTJSONEnumType":{
"type":"string",
"enum":[
"foo",
"bar",
"0",
"1"
]
},
"TimestampFormatType": {
"timestampFormat": "unixTimestamp",
"type": "timestamp"
},
"TimestampType": {
"type": "timestamp"
"EnumList":{
"type":"list",
"member": {"shape": "RESTJSONEnumType"}
}
},
"cases": [
@@ -782,28 +793,121 @@
"output": {
"shape": "OutputShape"
},
"http": {
"method": "POST",
"requestUri": "/path"
},
"name": "OperationName"
},
"result": {
"TimeArg": 1398796238,
"TimeArgInHeader": 1398796238,
"TimeCustom": 1398796238,
"TimeCustomInHeader": 1398796238,
"TimeFormat": 1398796238,
"TimeFormatInHeader": 1398796238,
"StructMember": {
"foo": 1398796238,
"bar": 1398796238
}
"HeaderEnum": "baz",
"FooEnum": "foo",
"ListEnums": ["0", "1"]
},
"response": {
"status_code": 200,
"headers": {
"x-amz-timearg": "Tue, 29 Apr 2014 18:30:38 GMT",
"x-amz-timecustom": "1398796238",
"x-amz-timeformat": "1398796238"
"headers": {"x-amz-enum": "baz"},
"body": "<OperationNameResponse><FooEnum>foo</FooEnum><ListEnums><member>0</member><member>1</member></ListEnums></OperationNameResponse>"
}
},
{
"given": {
"input": {
"shape": "OutputShape"
},
"body": "<OperationNameResponse><StructMember><foo>2014-04-29T18:30:38Z</foo><bar>1398796238</bar></StructMember><TimeArg>2014-04-29T18:30:38Z</TimeArg><TimeCustom>Tue, 29 Apr 2014 18:30:38 GMT</TimeCustom><TimeFormat>1398796238</TimeFormat><RequestId>requestid</RequestId></OperationNameResponse>"
"http": {
"method": "POST",
"requestUri": "/path"
},
"name": "OperationName"
},
"result": {
},
"response": {
"status_code": 200,
"headers": {}
}
}
]
},
{
"description": "XML Attributes",
"metadata": {
"protocol": "rest-xml"
},
"shapes": {
"OutputShape":{
"type":"structure",
"members":{
"ListItems":{
"shape":"ListItemsShape",
"locationName":"ItemsList"
}
}
},
"ListItemsShape":{
"type":"list",
"member":{
"shape":"ItemShape",
"locationName":"Item"
}
},
"ItemShape":{
"type":"structure",
"members":{
"ItemDetail":{"shape":"ItemDetailShape"}
}
},
"ItemDetailShape":{
"type":"structure",
"required":["Type"],
"members":{
"ID":{"shape":"StringShape"},
"Type":{
"shape":"ItemType",
"locationName":"xsi:type",
"xmlAttribute":true
}
},
"xmlNamespace":{
"prefix":"xsi",
"uri":"http://www.w3.org/2001/XMLSchema-instance"
}
},
"StringShape":{
"type":"string"
},
"ItemType":{
"type":"string",
"enum":[
"Type1",
"Type2",
"Type3"
]
}
},
"cases": [
{
"given": {
"output": {
"shape": "OutputShape"
},
"http": {
"method": "GET",
"requestUri": "/path"
},
"name": "OperationName"
},
"result": {
"ListItems": [
{"ItemDetail": {"ID": "id1", "Type": "Type1"}},
{"ItemDetail": {"ID": "id2", "Type": "Type2"}},
{"ItemDetail": {"ID": "id3", "Type": "Type3"}}
]
},
"response": {
"status_code": 200,
"body": "<SomeOutputDoc xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\"><ItemsList><Item><ItemDetail xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"Type1\"><ID>id1</ID></ItemDetail></Item><Item><ItemDetail xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"Type2\"><ID>id2</ID></ItemDetail></Item><Item><ItemDetail xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"Type3\"><ID>id3</ID></ItemDetail></Item></ItemsList></SomeOutputDoc>"
}
}
]