Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix protocol tests with new changes to CBOR and Rest #3123

Merged
merged 6 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"rest-xml" : {
"input" : {},
"input" : {
"NestedXmlMapWithXmlNameSerializes": {
"description": "Smithy 1.52.0 did not include a fix to this test.",
"engines": ["ox", "nokogiri", "rexml", "libxml", "oga"]
}
},
"output" : {
"SimpleScalarPropertiesComplexEscapes": {
"description": "OxEngine does not handle all escape cases but other engines supports it",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@
},
"documentation": "<p>This examples adds headers to the input of a request and response by prefix.</p>"
},
"description": "No prefix headers are serialized because the value is empty",
"description": "No prefix headers are serialized because the value is not present",
"params": {
"foo": "Foo",
"fooMap": {}
Expand All @@ -1698,6 +1698,35 @@
"X-Foo": "Foo"
}
}
},
{
"id": "RestJsonHttpPrefixEmptyHeaders",
"given": {
"name": "HttpPrefixHeaders",
"http": {
"method": "GET",
"requestUri": "/HttpPrefixHeaders",
"responseCode": 200
},
"input": {
"shape": "HttpPrefixHeadersInput"
},
"documentation": "<p>This examples adds headers to the input of a request and response by prefix.</p>"
},
"description": "Serialize prefix headers were the value is present but empty",
"params": {
"fooMap": {
"Abc": ""
}
},
"serialized": {
"method": "GET",
"uri": "/HttpPrefixHeaders",
"body": "",
"headers": {
"X-Foo-Abc": ""
}
}
}
]
},
Expand Down Expand Up @@ -4362,7 +4391,7 @@
},
"documentation": "<p>Null and empty headers are not sent over the wire.</p>"
},
"description": "Do not send null values, empty strings, or empty lists over the wire in headers",
"description": "Do not send null values, but do send empty strings and empty lists over the wire in headers",
"params": {
"a": null,
"b": "",
Expand All @@ -4372,10 +4401,12 @@
"method": "GET",
"uri": "/NullAndEmptyHeadersClient",
"body": "",
"headers": {
"X-B": "",
"X-C": ""
},
"forbidHeaders": [
"X-A",
"X-B",
"X-C"
"X-A"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@
},
"documentation": "<p>This examples adds headers to the input of a request and response by prefix.</p>"
},
"description": "No prefix headers are serialized because the value is empty",
"description": "No prefix headers are serialized because the value is not present",
"params": {
"foo": "Foo",
"fooMap": {}
Expand All @@ -1687,6 +1687,35 @@
"X-Foo": "Foo"
}
}
},
{
"id": "HttpPrefixEmptyHeaders",
"given": {
"name": "HttpPrefixHeaders",
"http": {
"method": "GET",
"requestUri": "/HttpPrefixHeaders",
"responseCode": 200
},
"input": {
"shape": "HttpPrefixHeadersInputOutput"
},
"documentation": "<p>This examples adds headers to the input of a request and response by prefix.</p>"
},
"description": "Serialize prefix headers were the value is present but empty",
"params": {
"fooMap": {
"Abc": ""
}
},
"serialized": {
"method": "GET",
"uri": "/HttpPrefixHeaders",
"body": "",
"headers": {
"X-Foo-Abc": ""
}
}
}
]
},
Expand Down Expand Up @@ -2750,6 +2779,89 @@
}
]
},
{
"description": "Test cases for NestedXmlMapWithXmlName operation",
"metadata": {
"protocol": "rest-xml",
"protocols": [
"rest-xml"
],
"apiVersion": "2019-12-16"
},
"shapes": {
"NestedXmlMapWithXmlNameInputOutput": {
"type": "structure",
"members": {
"nestedXmlMapWithXmlNameMap": {
"shape": "NestedXmlMapWithXmlNameMap"
}
}
},
"NestedXmlMapWithXmlNameMap": {
"type": "map",
"key": {
"shape": "String",
"locationName": "OuterKey"
},
"value": {
"shape": "NestedXmlMapWithXmlNameInnerMap"
}
},
"NestedXmlMapWithXmlNameInnerMap": {
"type": "map",
"key": {
"shape": "String",
"locationName": "InnerKey"
},
"value": {
"shape": "String",
"locationName": "InnerValue"
}
},
"String": {
"type": "string"
}
},
"cases": [
{
"id": "NestedXmlMapWithXmlNameSerializes",
"given": {
"name": "NestedXmlMapWithXmlName",
"http": {
"method": "POST",
"requestUri": "/NestedXmlMapWithXmlName",
"responseCode": 200
},
"input": {
"shape": "NestedXmlMapWithXmlNameInputOutput",
"locationName": "NestedXmlMapWithXmlNameRequest"
},
"documentation": "<p>Nested Xml Maps with key/values with @xmlName</p>"
},
"description": "Serializes nested XML Maps in requests that have xmlName on members",
"params": {
"nestedXmlMapWithXmlNameMap": {
"foo": {
"bar": "Baz",
"fizz": "Buzz"
},
"qux": {
"foobar": "Bar",
"fizzbuzz": "Buzz"
}
}
},
"serialized": {
"method": "POST",
"uri": "/NestedXmlMapWithXmlName",
"body": " <NestedXmlMapWithXmlNameInputOutput>\n <nestedXmlMapWithXmlNameMap>\n <entry>\n <OuterKey>foo</OuterKey>\n <value>\n <entry>\n <InnerKey>bar</InnerKey>\n <InnerValue>Baz</InnerValue>\n </entry>\n <entry>\n <InnerKey>fizz</InnerKey>\n <InnerValue>Buzz</InnerValue>\n </entry>\n </value>\n </entry>\n <entry>\n <OuterKey>qux</OuterKey>\n <value>\n <entry>\n <InnerKey>foobar</InnerKey>\n <InnerValue>Bar</InnerValue>\n </entry>\n <entry>\n <InnerKey>fizzbuzz</InnerKey>\n <InnerValue>Buzz</InnerValue>\n </entry>\n </value>\n </entry>\n </nestedXmlMapWithXmlNameMap>\n </NestedXmlMapWithXmlNameInputOutput>\n",
"headers": {
"Content-Type": "application/xml"
}
}
}
]
},
{
"description": "Test cases for NoInputAndNoOutput operation",
"metadata": {
Expand Down Expand Up @@ -2869,7 +2981,7 @@
},
"documentation": "<p>Null and empty headers are not sent over the wire.</p>"
},
"description": "Do not send null values, empty strings, or empty lists over the wire in headers",
"description": "Do not send null values, but do send empty strings and empty lists over the wire in headers",
"params": {
"a": null,
"b": "",
Expand All @@ -2879,10 +2991,12 @@
"method": "GET",
"uri": "/NullAndEmptyHeadersClient",
"body": "",
"headers": {
"X-B": "",
"X-C": ""
},
"forbidHeaders": [
"X-A",
"X-B",
"X-C"
"X-A"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"uri": "/service/RpcV2Protocol/operation/EmptyInputOutput",
"body": "v/8=",
"headers": {
"Accept": "application/cbor",
mullermp marked this conversation as resolved.
Show resolved Hide resolved
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -76,6 +77,7 @@
"uri": "/service/RpcV2Protocol/operation/NoInputOutput",
"body": "",
"headers": {
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
"forbidHeaders": [
Expand Down Expand Up @@ -129,6 +131,7 @@
"uri": "/service/RpcV2Protocol/operation/OptionalInputOutput",
"body": "v/8=",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -217,6 +220,7 @@
"uri": "/service/RpcV2Protocol/operation/RecursiveShapes",
"body": "v2ZuZXN0ZWS/Y2Zvb2RGb28xZm5lc3RlZL9jYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyv2Nmb29kRm9vMmZuZXN0ZWS/Y2JhcmRCYXIy//////8=",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -359,6 +363,7 @@
"uri": "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps",
"body": "oW5kZW5zZVN0cnVjdE1hcKJjZm9voWJoaWV0aGVyZWNiYXqhYmhpY2J5ZQ==",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -394,6 +399,7 @@
"uri": "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps",
"body": "om5kZW5zZU51bWJlck1hcKFheABvZGVuc2VCb29sZWFuTWFwoWF49A==",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -430,6 +436,7 @@
"uri": "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps",
"body": "oWtkZW5zZVNldE1hcKJheIBheYJhYWFi",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -665,6 +672,7 @@
"uri": "/service/RpcV2Protocol/operation/RpcV2CborLists",
"body": "v2pzdHJpbmdMaXN0gmNmb29jYmFyaXN0cmluZ1NldIJjZm9vY2JhcmtpbnRlZ2VyTGlzdIIBAmtib29sZWFuTGlzdIL19G10aW1lc3RhbXBMaXN0gsH7QdTX+/OAAADB+0HU1/vzgAAAaGVudW1MaXN0gmNGb29hMGtpbnRFbnVtTGlzdIIBAnBuZXN0ZWRTdHJpbmdMaXN0goJjZm9vY2JhcoJjYmF6Y3F1eG1zdHJ1Y3R1cmVMaXN0gqJhYWExYWJhMqJhYWEzYWJhNGhibG9iTGlzdIJDZm9vQ2Jhcv8=",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -696,6 +704,7 @@
"uri": "/service/RpcV2Protocol/operation/RpcV2CborLists",
"body": "v2pzdHJpbmdMaXN0n///",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -727,6 +736,7 @@
"uri": "/service/RpcV2Protocol/operation/RpcV2CborLists",
"body": "oWpzdHJpbmdMaXN0gA==",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -841,6 +851,7 @@
"uri": "/service/RpcV2Protocol/operation/SimpleScalarProperties",
"body": "v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kD0AABsaW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -870,6 +881,7 @@
"uri": "/service/RpcV2Protocol/operation/SimpleScalarProperties",
"body": "v/8=",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -900,6 +912,7 @@
"uri": "/service/RpcV2Protocol/operation/SimpleScalarProperties",
"body": "v2tkb3VibGVWYWx1Zft/+AAAAAAAAGpmbG9hdFZhbHVl+n/AAAD/",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -930,6 +943,7 @@
"uri": "/service/RpcV2Protocol/operation/SimpleScalarProperties",
"body": "v2tkb3VibGVWYWx1Zft/8AAAAAAAAGpmbG9hdFZhbHVl+n+AAAD/",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down Expand Up @@ -960,6 +974,7 @@
"uri": "/service/RpcV2Protocol/operation/SimpleScalarProperties",
"body": "v2tkb3VibGVWYWx1Zfv/8AAAAAAAAGpmbG9hdFZhbHVl+v+AAAD/",
"headers": {
"Accept": "application/cbor",
"Content-Type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
Expand Down
Loading
Loading