From a9862f018c33b795d8b363c59407419a69d4f915 Mon Sep 17 00:00:00 2001 From: kstich Date: Fri, 29 May 2020 10:25:34 -0700 Subject: [PATCH] Mark httpChecksumRequired trait unstable --- .../amazon/smithy/model/loader/prelude-traits.smithy | 1 + .../validators/http-checksum-required-trait.errors | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/smithy-model/src/main/resources/software/amazon/smithy/model/loader/prelude-traits.smithy b/smithy-model/src/main/resources/software/amazon/smithy/model/loader/prelude-traits.smithy index 9151603466f..8f2b5882103 100644 --- a/smithy-model/src/main/resources/software/amazon/smithy/model/loader/prelude-traits.smithy +++ b/smithy-model/src/main/resources/software/amazon/smithy/model/loader/prelude-traits.smithy @@ -645,5 +645,6 @@ list suppress { /// Marks an operation as requiring checksum in its HTTP request. /// By default, the checksum used for a service is a MD5 checksum /// passed in the Content-MD5 header. +@unstable @trait(selector: "operation") structure httpChecksumRequired {} diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-checksum-required-trait.errors b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-checksum-required-trait.errors index 92a3fc18731..9e7a36bfc7c 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-checksum-required-trait.errors +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-checksum-required-trait.errors @@ -2,3 +2,8 @@ [ERROR] ns.foo#InvalidOutput: Trait `httpChecksumRequired` cannot be applied to `ns.foo#InvalidOutput`. This trait may only be applied to shapes that match the following selector: operation | TraitTarget [ERROR] ns.foo#InvalidError: Trait `httpChecksumRequired` cannot be applied to `ns.foo#InvalidError`. This trait may only be applied to shapes that match the following selector: operation | TraitTarget [ERROR] ns.foo#InvalidStructure$Body: Trait `httpChecksumRequired` cannot be applied to `ns.foo#InvalidStructure$Body`. This trait may only be applied to shapes that match the following selector: operation | TraitTarget +[WARNING] ns.foo#InvalidError: This shape applies a trait that is unstable: smithy.api#httpChecksumRequired | UnstableTrait +[WARNING] ns.foo#InvalidInput: This shape applies a trait that is unstable: smithy.api#httpChecksumRequired | UnstableTrait +[WARNING] ns.foo#InvalidOutput: This shape applies a trait that is unstable: smithy.api#httpChecksumRequired | UnstableTrait +[WARNING] ns.foo#InvalidStructure$Body: This shape applies a trait that is unstable: smithy.api#httpChecksumRequired | UnstableTrait +[WARNING] ns.foo#ValidOperation: This shape applies a trait that is unstable: smithy.api#httpChecksumRequired | UnstableTrait