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

Update Request Compression Trait specification #1831

Merged
merged 4 commits into from
Jun 21, 2023
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
4 changes: 3 additions & 1 deletion docs/source-1.0/spec/aws/aws-ec2-query-protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ Value type

.. important::

This protocol does not support document types.
* This protocol does not support document types.
* This protocol does not support :ref:`HTTP binding traits <http-traits>`.
HTTP binding traits MUST be ignored if they are present.

.. tabs::

Expand Down
2 changes: 1 addition & 1 deletion docs/source-1.0/spec/core/behavior-traits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ members:
- Type
- Description
* - encodings
- ``list<string>``
- ``[string]``
- Defines the priority-ordered list of compression algorithms supported by
the service operation. Supported compression algorithms are: "gzip".

Expand Down
4 changes: 3 additions & 1 deletion docs/source-2.0/aws/protocols/aws-ec2-query-protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ Value type

.. important::

This protocol does not support document types.
* This protocol does not support document types.
* This protocol does not support :ref:`HTTP binding traits <http-traits>`.
HTTP binding traits MUST be ignored if they are present.

.. code-block:: smithy

Expand Down
2 changes: 1 addition & 1 deletion docs/source-2.0/spec/behavior-traits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ members:
- Type
- Description
* - encodings
- ``list<string>``
- ``[string]``
- Defines the priority-ordered list of compression algorithms supported by
the service operation. Supported compression algorithms are: "gzip".

Expand Down
2 changes: 1 addition & 1 deletion docs/source-2.0/spec/http-bindings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and error structures are considered when serializing HTTP messages.

.. important::

Violating :rfc`HTTP specifications <7230>` or relying on poorly-supported
Violating :rfc:`HTTP specifications <7230>` or relying on poorly-supported
HTTP functionality when defining HTTP bindings will limit interoperability
and likely lead to undefined behavior across Smithy implementations. For
example, avoid defining GET/DELETE requests with payloads, defining
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use smithy.test#httpResponseTests
apply PutWithContentEncoding @httpRequestTests([
{
id: "SDKAppliedContentEncoding_awsJson1_0"
documentation: "The user didn't apply an encoding, so the SDK applies gzip"
documentation: "Compression algorithm encoding is appended to the Content-Encoding header."
protocol: awsJson1_0
params: {
"data": """
Expand Down Expand Up @@ -150,8 +150,12 @@ apply PutWithContentEncoding @httpRequestTests([
}
}
{
id: "SDKAppendedGzipAfterProvidedEncoding_awsJson1_0"
documentation: "The user provided a content-encoding so the SDK appends gzip"
id: "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_0"
documentation: """
Compression algorithm encoding is appended to the Content-Encoding header, and the
user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
traits are ignored in the awsJson1_0 protocol.
"""
protocol: awsJson1_0
params: {
"encoding": "custom"
Expand Down Expand Up @@ -289,7 +293,7 @@ apply PutWithContentEncoding @httpRequestTests([
method: "POST"
uri: "/"
headers: {
"Content-Encoding": "custom, gzip"
"Content-Encoding": "gzip"
}
}
])
Expand All @@ -306,6 +310,5 @@ structure PutWithContentEncodingInput {
@httpHeader("Content-Encoding")
encoding: String

@httpPayload
data: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use smithy.test#httpResponseTests
apply PutWithContentEncoding @httpRequestTests([
{
id: "SDKAppliedContentEncoding_awsJson1_1"
documentation: "The user didn't apply an encoding, so the SDK applies gzip"
documentation: "Compression algorithm encoding is appended to the Content-Encoding header."
protocol: awsJson1_1
params: {
"data": """
Expand Down Expand Up @@ -150,8 +150,12 @@ apply PutWithContentEncoding @httpRequestTests([
}
}
{
id: "SDKAppendedGzipAfterProvidedEncoding_awsJson1_1"
documentation: "The user provided a content-encoding so the SDK appends gzip"
id: "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1"
documentation: """
Compression algorithm encoding is appended to the Content-Encoding header, and the
user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
traits are ignored in the awsJson1_1 protocol.
"""
protocol: awsJson1_1
params: {
"encoding": "custom"
Expand Down Expand Up @@ -289,7 +293,7 @@ apply PutWithContentEncoding @httpRequestTests([
method: "POST"
uri: "/"
headers: {
"Content-Encoding": "custom, gzip"
"Content-Encoding": "gzip"
}
}
])
Expand All @@ -306,6 +310,5 @@ structure PutWithContentEncodingInput {
@httpHeader("Content-Encoding")
encoding: String

@httpPayload
data: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use smithy.test#httpResponseTests
apply PutWithContentEncoding @httpRequestTests([
{
id: "SDKAppliedContentEncoding_awsQuery"
documentation: "The user didn't apply an encoding, so the SDK applies gzip"
documentation: "Compression algorithm encoding is appended to the Content-Encoding header."
protocol: awsQuery
params: {
"data": """
Expand Down Expand Up @@ -150,8 +150,12 @@ apply PutWithContentEncoding @httpRequestTests([
}
}
{
id: "SDKAppendedGzipAfterProvidedEncoding_awsQuery"
documentation: "The user provided a content-encoding so the SDK appends gzip"
id: "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsQuery"
documentation: """
Compression algorithm encoding is appended to the Content-Encoding header, and the
user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
traits are ignored in the awsQuery protocol.
"""
protocol: awsQuery
params: {
"encoding": "custom"
Expand Down Expand Up @@ -289,7 +293,7 @@ apply PutWithContentEncoding @httpRequestTests([
method: "POST"
uri: "/"
headers: {
"Content-Encoding": "custom, gzip"
"Content-Encoding": "gzip"
}
}
])
Expand All @@ -306,6 +310,5 @@ structure PutWithContentEncodingInput {
@httpHeader("Content-Encoding")
encoding: String

@httpPayload
data: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use smithy.test#httpResponseTests
apply PutWithContentEncoding @httpRequestTests([
{
id: "SDKAppliedContentEncoding_ec2Query"
documentation: "The user didn't apply an encoding, so the SDK applies gzip"
documentation: "Compression algorithm encoding is appended to the Content-Encoding header."
protocol: ec2Query
params: {
"data": """
Expand Down Expand Up @@ -150,8 +150,12 @@ apply PutWithContentEncoding @httpRequestTests([
}
}
{
id: "SDKAppendedGzipAfterProvidedEncoding_ec2Query"
documentation: "The user provided a content-encoding so the SDK appends gzip"
id: "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_ec2Query"
documentation: """
Compression algorithm encoding is appended to the Content-Encoding header, and the
user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
traits are ignored in the ec2Query protocol.
"""
protocol: ec2Query
params: {
"encoding": "custom"
Expand Down Expand Up @@ -289,7 +293,7 @@ apply PutWithContentEncoding @httpRequestTests([
method: "POST"
uri: "/"
headers: {
"Content-Encoding": "custom, gzip"
"Content-Encoding": "gzip"
}
}
])
Expand All @@ -306,6 +310,5 @@ structure PutWithContentEncodingInput {
@httpHeader("Content-Encoding")
encoding: String

@httpPayload
data: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use smithy.test#httpResponseTests
apply PutWithContentEncoding @httpRequestTests([
{
id: "SDKAppliedContentEncoding_restJson1"
documentation: "The user didn't apply an encoding, so the SDK applies gzip"
documentation: "Compression algorithm encoding is appended to the Content-Encoding header."
protocol: restJson1
params: {
"data": """
Expand Down Expand Up @@ -151,7 +151,11 @@ apply PutWithContentEncoding @httpRequestTests([
}
{
id: "SDKAppendedGzipAfterProvidedEncoding_restJson1"
documentation: "The user provided a content-encoding so the SDK appends gzip"
documentation: """
Compression algorithm encoding is appended to the Content-Encoding header, and the
user-provided content-encoding is in the Content-Encoding header before the
request compression encoding from the HTTP binding.
"""
protocol: restJson1
params: {
"encoding": "custom"
Expand Down Expand Up @@ -310,6 +314,5 @@ structure PutWithContentEncodingInput {
@httpHeader("Content-Encoding")
encoding: String

@httpPayload
data: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use smithy.test#httpResponseTests
apply PutWithContentEncoding @httpRequestTests([
{
id: "SDKAppliedContentEncoding_restXml"
documentation: "The user didn't apply an encoding, so the SDK applies gzip"
documentation: "Compression algorithm encoding is appended to the Content-Encoding header."
protocol: restXml
params: {
"data": """
Expand Down Expand Up @@ -151,7 +151,11 @@ apply PutWithContentEncoding @httpRequestTests([
}
{
id: "SDKAppendedGzipAfterProvidedEncoding_restXml"
documentation: "The user provided a content-encoding so the SDK appends gzip"
documentation: """
Compression algorithm encoding is appended to the Content-Encoding header, and the
user-provided content-encoding is in the Content-Encoding header before the
request compression encoding from the HTTP binding.
"""
protocol: restXml
params: {
"encoding": "custom"
Expand Down Expand Up @@ -310,6 +314,5 @@ structure PutWithContentEncodingInput {
@httpHeader("Content-Encoding")
encoding: String

@httpPayload
data: String
}