Skip to content

Commit a7c3fd5

Browse files
authored
Add test case for requestChecksumRequired=false (#2401)
1 parent 3c4f7d8 commit a7c3fd5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.errors

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
[SUPPRESSED] smithy.example#NoOutputForResponse: This shape applies a trait that is unstable: aws.protocols#httpChecksum | UnstableTrait
44
[SUPPRESSED] smithy.example#NoResponseAlgorithms: This shape applies a trait that is unstable: aws.protocols#httpChecksum | UnstableTrait
55
[ERROR] smithy.example#NoBehavior: The `httpChecksum` trait must define at least one of the `request` or `response` checksum behaviors. | HttpChecksumTrait
6+
[ERROR] smithy.example#NoBehaviorRequestChecksumRequiredFalse: The `httpChecksum` trait must define at least one of the `request` or `response` checksum behaviors. | HttpChecksumTrait
67
[ERROR] smithy.example#NoModeForResponse: The `httpChecksum` trait must model the `requestValidationModeMember` property to support response checksum behavior. | HttpChecksumTrait
78
[ERROR] smithy.example#NoResponseAlgorithms: The `httpChecksum` trait must model the `responseAlgorithms` property to support response checksum behavior. | HttpChecksumTrait

smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.smithy

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ operation NoBehavior {
1414
@input
1515
structure NoBehaviorInput {}
1616

17+
@httpChecksum(
18+
requestChecksumRequired: false,
19+
)
20+
@suppress(["UnstableTrait"])
21+
operation NoBehaviorRequestChecksumRequiredFalse {
22+
input: NoBehaviorRequestChecksumRequiredFalseInput,
23+
output: Unit
24+
}
25+
26+
@input
27+
structure NoBehaviorRequestChecksumRequiredFalseInput {}
28+
1729
@httpChecksum(
1830
requestChecksumRequired: true,
1931
)

0 commit comments

Comments
 (0)