From a7c3fd57a9d550e3918a564896585b971a7235fb Mon Sep 17 00:00:00 2001 From: Jaykumar Gosar <5666661+gosar@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:43:53 -0700 Subject: [PATCH] Add test case for requestChecksumRequired=false (#2401) --- .../aws/traits/errorfiles/http-checksum-trait.errors | 1 + .../aws/traits/errorfiles/http-checksum-trait.smithy | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.errors b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.errors index 750e98437f0..361bfb9f053 100644 --- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.errors +++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.errors @@ -3,5 +3,6 @@ [SUPPRESSED] smithy.example#NoOutputForResponse: This shape applies a trait that is unstable: aws.protocols#httpChecksum | UnstableTrait [SUPPRESSED] smithy.example#NoResponseAlgorithms: This shape applies a trait that is unstable: aws.protocols#httpChecksum | UnstableTrait [ERROR] smithy.example#NoBehavior: The `httpChecksum` trait must define at least one of the `request` or `response` checksum behaviors. | HttpChecksumTrait +[ERROR] smithy.example#NoBehaviorRequestChecksumRequiredFalse: The `httpChecksum` trait must define at least one of the `request` or `response` checksum behaviors. | HttpChecksumTrait [ERROR] smithy.example#NoModeForResponse: The `httpChecksum` trait must model the `requestValidationModeMember` property to support response checksum behavior. | HttpChecksumTrait [ERROR] smithy.example#NoResponseAlgorithms: The `httpChecksum` trait must model the `responseAlgorithms` property to support response checksum behavior. | HttpChecksumTrait diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.smithy index 24ce4cf32c6..4710c018c4a 100644 --- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.smithy +++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.smithy @@ -14,6 +14,18 @@ operation NoBehavior { @input structure NoBehaviorInput {} +@httpChecksum( + requestChecksumRequired: false, +) +@suppress(["UnstableTrait"]) +operation NoBehaviorRequestChecksumRequiredFalse { + input: NoBehaviorRequestChecksumRequiredFalseInput, + output: Unit +} + +@input +structure NoBehaviorRequestChecksumRequiredFalseInput {} + @httpChecksum( requestChecksumRequired: true, )