Skip to content

Commit 30201cb

Browse files
authored
Do not return internal enum values (#1658)
1 parent 8db6aef commit 30201cb

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

smithy-aws-protocol-tests/model/restJson1/validation/malformed-enum.smithy

+16-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ apply MalformedEnum @httpMalformedRequestTests([
1818
id: "RestJsonMalformedEnumString",
1919
documentation: """
2020
When a string member does not contain a valid enum value,
21-
the response should be a 400 ValidationException.""",
21+
the response should be a 400 ValidationException. Internal-only
22+
enum values are excluded from the response message.""",
2223
protocol: restJson1,
2324
request: {
2425
method: "POST",
@@ -51,7 +52,8 @@ apply MalformedEnum @httpMalformedRequestTests([
5152
id: "RestJsonMalformedEnumList",
5253
documentation: """
5354
When a list member value does not contain a valid enum value,
54-
the response should be a 400 ValidationException.""",
55+
the response should be a 400 ValidationException. Internal-only
56+
enum values are excluded from the response message.""",
5557
protocol: restJson1,
5658
request: {
5759
method: "POST",
@@ -84,7 +86,8 @@ apply MalformedEnum @httpMalformedRequestTests([
8486
id: "RestJsonMalformedEnumMapKey",
8587
documentation: """
8688
When a map member's key does not contain a valid enum value,
87-
the response should be a 400 ValidationException.""",
89+
the response should be a 400 ValidationException. Internal-only
90+
enum values are excluded from the response message.""",
8891
protocol: restJson1,
8992
request: {
9093
method: "POST",
@@ -117,7 +120,8 @@ apply MalformedEnum @httpMalformedRequestTests([
117120
id: "RestJsonMalformedEnumMapValue",
118121
documentation: """
119122
When a map member's value does not contain a valid enum value,
120-
the response should be a 400 ValidationException.""",
123+
the response should be a 400 ValidationException. Internal-only
124+
enum values are excluded from the response message.""",
121125
protocol: restJson1,
122126
request: {
123127
method: "POST",
@@ -150,7 +154,8 @@ apply MalformedEnum @httpMalformedRequestTests([
150154
id: "RestJsonMalformedEnumUnion",
151155
documentation: """
152156
When a union member's value does not contain a valid enum value,
153-
the response should be a 400 ValidationException.""",
157+
the response should be a 400 ValidationException. Internal-only
158+
enum values are excluded from the response message.""",
154159
protocol: restJson1,
155160
request: {
156161
method: "POST",
@@ -194,6 +199,12 @@ structure MalformedEnumInput {
194199
enum EnumString {
195200
ABC = "abc"
196201
DEF = "def"
202+
203+
@internal
204+
GHI = "ghi"
205+
206+
@tags(["internal"])
207+
JKL = "jkl"
197208
}
198209

199210
list EnumList {

0 commit comments

Comments
 (0)