Skip to content

Commit

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

/// Indicates that an operation supports checksum validation.
@trait(selector: "operation")
@trait(
selector: "operation",
breakingChanges: [
{
change: "remove",
severity: "ERROR",
},
{
change: "remove",
path: "/requestAlgorithmMember",
severity: "ERROR",
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: "ERROR",
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: "ERROR",
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 @@
[ERROR] 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 @@
[ERROR] 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 @@
[ERROR] 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
-----
[ERROR] 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
-----
[ERROR] 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
-----
[ERROR] 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
-----
[ERROR] 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 e1bf982

Please sign in to comment.