Skip to content

Commit

Permalink
Add breakingChanges for httpChecksum trait (#2398)
Browse files Browse the repository at this point in the history
  • Loading branch information
gosar committed Sep 17, 2024
1 parent e334862 commit 75d5a75
Show file tree
Hide file tree
Showing 13 changed files with 390 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,45 @@ structure ec2Query {}
string ec2QueryName

/// Indicates that an operation supports checksum validation.
@trait(selector: "operation")
@trait(
selector: "operation",
breakingChanges: [
{
change: "remove",
severity: "DANGER",
message: """
Removing the trait removes the ability for clients to do request or response checksums. The service \
MUST continue to support old clients by supporting the `httpChecksum` trait."""
},
{
change: "remove",
path: "/requestAlgorithmMember",
severity: "DANGER",
message: """
`requestAlgorithmMember` was removed, so newly generated clients will no longer be able to pick the \
request checksum algorithms The service MUST continue to support old clients by supporting \
`requestAlgorithmMember`."""
},
{
change: "remove",
path: "/requestValidationModeMember",
severity: "DANGER",
message: """
`requestValidationModeMember` was removed, so newly generated clients will no longer validate response \
checksums. The service MUST continue to support old clients by supporting \
`requestValidationModeMember`."""
},
{
change: "remove",
path: "/responseAlgorithms/member",
severity: "DANGER",
message: """
Members of `responseAlgorithms` were removed, so newly generated clients will no longer validate \
response checksums for the removed algorithms. The service MUST continue to support old clients by \
supporting removed compression algorithms."""
}
]
)
@unstable
structure httpChecksum {
/// Defines a top-level operation input member that is used to configure
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$version: "2.0"

namespace ns.foo

use aws.protocols#httpChecksum

service Service {
operations: [
PutSomething
]
}

@httpChecksum(
requestChecksumRequired: true,
requestAlgorithmMember: "checksumAlgorithm"
)
operation PutSomething {
input: PutSomethingInput
}

structure PutSomethingInput {
@httpHeader("x-amz-request-algorithm")
checksumAlgorithm: ChecksumAlgorithm

@httpHeader("x-amz-response-validation-mode")
validationMode: ValidationMode

@httpPayload
content: Blob
}

enum ChecksumAlgorithm {
CRC32C
CRC32
SHA1
SHA256
}

enum ValidationMode {
ENABLED
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
$version: "2.0"

namespace ns.foo

use aws.protocols#httpChecksum

service Service {
operations: [
PutSomething
]
}

@httpChecksum(
requestChecksumRequired: true
)
operation PutSomething {
input: PutSomethingInput
}

structure PutSomethingInput {
@httpHeader("x-amz-request-algorithm")
checksumAlgorithm: ChecksumAlgorithm

@httpHeader("x-amz-response-validation-mode")
validationMode: ValidationMode

@httpPayload
content: Blob
}

enum ChecksumAlgorithm {
CRC32C
CRC32
SHA1
SHA256
}

enum ValidationMode {
ENABLED
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[DANGER] ns.foo#PutSomething: Removed trait contents from `aws.protocols#httpChecksum` at path `/requestAlgorithmMember`. Removed value: `checksumAlgorithm`; `requestAlgorithmMember` was removed, so newly generated clients will no longer be able to pick the request checksum algorithms The service MUST continue to support old clients by supporting `requestAlgorithmMember`. | TraitBreakingChange.Remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$version: "2.0"

namespace ns.foo

use aws.protocols#httpChecksum

service Service {
operations: [
PutSomething
]
}

@httpChecksum(
requestValidationModeMember: "validationMode",
responseAlgorithms: ["CRC32C", "CRC32", "SHA1", "SHA256"]
)
operation PutSomething {
input: PutSomethingInput
}

structure PutSomethingInput {
@httpHeader("x-amz-request-algorithm")
checksumAlgorithm: ChecksumAlgorithm

@httpHeader("x-amz-response-validation-mode")
validationMode: ValidationMode

@httpPayload
content: Blob
}

enum ChecksumAlgorithm {
CRC32C
CRC32
SHA1
SHA256
}

enum ValidationMode {
ENABLED
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$version: "2.0"

namespace ns.foo

use aws.protocols#httpChecksum

service Service {
operations: [
PutSomething
]
}

@httpChecksum(
requestValidationModeMember: "validationMode",
responseAlgorithms: ["CRC32C", "CRC32", "SHA1"]
)
operation PutSomething {
input: PutSomethingInput
}

structure PutSomethingInput {
@httpHeader("x-amz-request-algorithm")
checksumAlgorithm: ChecksumAlgorithm

@httpHeader("x-amz-response-validation-mode")
validationMode: ValidationMode

@httpPayload
content: Blob
}

enum ChecksumAlgorithm {
CRC32C
CRC32
SHA1
SHA256
}

enum ValidationMode {
ENABLED
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[DANGER] ns.foo#PutSomething: Removed trait contents from `aws.protocols#httpChecksum` at path `/responseAlgorithms/3`. Removed value: `SHA256`; Members of `responseAlgorithms` were removed, so newly generated clients will no longer validate response checksums for the removed algorithms. The service MUST continue to support old clients by supporting removed compression algorithms. | TraitBreakingChange.Remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
$version: "2.0"

namespace ns.foo

use aws.protocols#httpChecksum

service Service {
operations: [
PutSomething
]
}

@httpChecksum(
requestChecksumRequired: true,
requestAlgorithmMember: "checksumAlgorithm",
requestValidationModeMember: "validationMode",
responseAlgorithms: ["CRC32C", "CRC32", "SHA1", "SHA256"]
)
operation PutSomething {
input: PutSomethingInput
}

structure PutSomethingInput {
@httpHeader("x-amz-request-algorithm")
checksumAlgorithm: ChecksumAlgorithm

@httpHeader("x-amz-response-validation-mode")
validationMode: ValidationMode

@httpPayload
content: Blob
}

enum ChecksumAlgorithm {
CRC32C
CRC32
SHA1
SHA256
}

enum ValidationMode {
ENABLED
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$version: "2.0"

namespace ns.foo

use aws.protocols#httpChecksum

service Service {
operations: [
PutSomething
]
}

@httpChecksum(
requestChecksumRequired: true,
requestAlgorithmMember: "checksumAlgorithm"
)
operation PutSomething {
input: PutSomethingInput
}

structure PutSomethingInput {
@httpHeader("x-amz-request-algorithm")
checksumAlgorithm: ChecksumAlgorithm

@httpHeader("x-amz-response-validation-mode")
validationMode: ValidationMode

@httpPayload
content: Blob
}

enum ChecksumAlgorithm {
CRC32C
CRC32
SHA1
SHA256
}

enum ValidationMode {
ENABLED
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[DANGER] ns.foo#PutSomething: Removed trait contents from `aws.protocols#httpChecksum` at path `/requestValidationModeMember`. Removed value: `validationMode`; `requestValidationModeMember` was removed, so newly generated clients will no longer validate response checksums. The service MUST continue to support old clients by supporting `requestValidationModeMember`. | TraitBreakingChange.Remove
-----
[DANGER] ns.foo#PutSomething: Removed trait contents from `aws.protocols#httpChecksum` at path `/responseAlgorithms/0`. Removed value: `CRC32C`; Members of `responseAlgorithms` were removed, so newly generated clients will no longer validate response checksums for the removed algorithms. The service MUST continue to support old clients by supporting removed compression algorithms. | TraitBreakingChange.Remove
-----
[DANGER] ns.foo#PutSomething: Removed trait contents from `aws.protocols#httpChecksum` at path `/responseAlgorithms/1`. Removed value: `CRC32`; Members of `responseAlgorithms` were removed, so newly generated clients will no longer validate response checksums for the removed algorithms. The service MUST continue to support old clients by supporting removed compression algorithms. | TraitBreakingChange.Remove
-----
[DANGER] ns.foo#PutSomething: Removed trait contents from `aws.protocols#httpChecksum` at path `/responseAlgorithms/2`. Removed value: `SHA1`; Members of `responseAlgorithms` were removed, so newly generated clients will no longer validate response checksums for the removed algorithms. The service MUST continue to support old clients by supporting removed compression algorithms. | TraitBreakingChange.Remove
-----
[DANGER] ns.foo#PutSomething: Removed trait contents from `aws.protocols#httpChecksum` at path `/responseAlgorithms/3`. Removed value: `SHA256`; Members of `responseAlgorithms` were removed, so newly generated clients will no longer validate response checksums for the removed algorithms. The service MUST continue to support old clients by supporting removed compression algorithms. | TraitBreakingChange.Remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
$version: "2.0"

namespace ns.foo

use aws.protocols#httpChecksum

service Service {
operations: [
PutSomething
]
}

@httpChecksum(
requestChecksumRequired: true,
requestAlgorithmMember: "checksumAlgorithm",
requestValidationModeMember: "validationMode",
responseAlgorithms: ["CRC32C", "CRC32", "SHA1", "SHA256"]
)
operation PutSomething {
input: PutSomethingInput
}

structure PutSomethingInput {
@httpHeader("x-amz-request-algorithm")
checksumAlgorithm: ChecksumAlgorithm

@httpHeader("x-amz-response-validation-mode")
validationMode: ValidationMode

@httpPayload
content: Blob
}

enum ChecksumAlgorithm {
CRC32C
CRC32
SHA1
SHA256
}

enum ValidationMode {
ENABLED
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
$version: "2.0"

namespace ns.foo

service Service {
operations: [
PutSomething
]
}

operation PutSomething {
input: PutSomethingInput
}

structure PutSomethingInput {
@httpHeader("x-amz-request-algorithm")
checksumAlgorithm: ChecksumAlgorithm

@httpHeader("x-amz-response-validation-mode")
validationMode: ValidationMode

@httpPayload
content: Blob
}

enum ChecksumAlgorithm {
CRC32C
CRC32
SHA1
SHA256
}

enum ValidationMode {
ENABLED
}
Loading

0 comments on commit 75d5a75

Please sign in to comment.