Skip to content

Commit 85e6d56

Browse files
committed
Remove reflected values from validation tests
1 parent 2eef778 commit 85e6d56

File tree

6 files changed

+132
-132
lines changed

6 files changed

+132
-132
lines changed

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

+10-10
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ apply MalformedEnum @httpMalformedRequestTests([
3838
mediaType: "application/json",
3939
assertion: {
4040
contents: """
41-
{ "message" : "1 validation error detected. Value $value:L at '/string' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
42-
"fieldList" : [{"message": "Value $value:L at '/string' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/string"}]}"""
41+
{ "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
42+
"fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/string"}]}"""
4343
}
4444
}
4545
},
@@ -71,8 +71,8 @@ apply MalformedEnum @httpMalformedRequestTests([
7171
mediaType: "application/json",
7272
assertion: {
7373
contents: """
74-
{ "message" : "1 validation error detected. Value $value:L at '/list/0' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
75-
"fieldList" : [{"message": "Value $value:L at '/list/0' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/list/0"}]}"""
74+
{ "message" : "1 validation error detected. Value at '/list/0' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
75+
"fieldList" : [{"message": "Value at '/list/0' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/list/0"}]}"""
7676
}
7777
}
7878
},
@@ -104,8 +104,8 @@ apply MalformedEnum @httpMalformedRequestTests([
104104
mediaType: "application/json",
105105
assertion: {
106106
contents: """
107-
{ "message" : "1 validation error detected. Value $value:L at '/map' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
108-
"fieldList" : [{"message": "Value $value:L at '/map' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/map"}]}"""
107+
{ "message" : "1 validation error detected. Value at '/map' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
108+
"fieldList" : [{"message": "Value at '/map' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/map"}]}"""
109109
}
110110
}
111111
},
@@ -137,8 +137,8 @@ apply MalformedEnum @httpMalformedRequestTests([
137137
mediaType: "application/json",
138138
assertion: {
139139
contents: """
140-
{ "message" : "1 validation error detected. Value $value:L at '/map/abc' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
141-
"fieldList" : [{"message": "Value $value:L at '/map/abc' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/map/abc"}]}"""
140+
{ "message" : "1 validation error detected. Value at '/map/abc' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
141+
"fieldList" : [{"message": "Value at '/map/abc' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/map/abc"}]}"""
142142
}
143143
}
144144
},
@@ -170,8 +170,8 @@ apply MalformedEnum @httpMalformedRequestTests([
170170
mediaType: "application/json",
171171
assertion: {
172172
contents: """
173-
{ "message" : "1 validation error detected. Value $value:L at '/union/first' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
174-
"fieldList" : [{"message": "Value $value:L at '/union/first' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/union/first"}]}"""
173+
{ "message" : "1 validation error detected. Value at '/union/first' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
174+
"fieldList" : [{"message": "Value at '/union/first' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/union/first"}]}"""
175175
}
176176
}
177177
},

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

+32-32
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ apply MalformedLength @httpMalformedRequestTests([
5252
mediaType: "application/json",
5353
assertion: {
5454
contents: """
55-
{ "message" : "1 validation error detected. Value with length $inputLength:L at '/blob' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
56-
"fieldList" : [{"message": "Value with length $inputLength:L at '/blob' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/blob"}]}"""
55+
{ "message" : "1 validation error detected. Value at '/blob' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
56+
"fieldList" : [{"message": "Value at '/blob' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/blob"}]}"""
5757
}
5858
}
5959
},
@@ -86,8 +86,8 @@ apply MalformedLength @httpMalformedRequestTests([
8686
mediaType: "application/json",
8787
assertion: {
8888
contents: """
89-
{ "message" : "1 validation error detected. Value with length $inputLength:L at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
90-
"fieldList" : [{"message": "Value with length $inputLength:L at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/string"}]}"""
89+
{ "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
90+
"fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/string"}]}"""
9191
}
9292
}
9393
},
@@ -120,8 +120,8 @@ apply MalformedLength @httpMalformedRequestTests([
120120
mediaType: "application/json",
121121
assertion: {
122122
contents: """
123-
{ "message" : "1 validation error detected. Value with length 1 at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 2",
124-
"fieldList" : [{"message": "Value with length 1 at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 2", "path": "/minString"}]}"""
123+
{ "message" : "1 validation error detected. Value at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 2",
124+
"fieldList" : [{"message": "Value at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 2", "path": "/minString"}]}"""
125125
}
126126
}
127127
}
@@ -150,8 +150,8 @@ apply MalformedLength @httpMalformedRequestTests([
150150
mediaType: "application/json",
151151
assertion: {
152152
contents: """
153-
{ "message" : "1 validation error detected. Value with length 26 at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 8",
154-
"fieldList" : [{"message": "Value with length 26 at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 8", "path": "/maxString"}]}"""
153+
{ "message" : "1 validation error detected. Value at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 8",
154+
"fieldList" : [{"message": "Value at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 8", "path": "/maxString"}]}"""
155155
}
156156
}
157157
}
@@ -180,8 +180,8 @@ apply MalformedLength @httpMalformedRequestTests([
180180
mediaType: "application/json",
181181
assertion: {
182182
contents: """
183-
{ "message" : "1 validation error detected. Value with length $inputLength:L at '/list' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
184-
"fieldList" : [{"message": "Value with length $inputLength:L at '/list' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/list"}]}"""
183+
{ "message" : "1 validation error detected. Value at '/list' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
184+
"fieldList" : [{"message": "Value at '/list' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/list"}]}"""
185185
}
186186
}
187187
},
@@ -215,8 +215,8 @@ apply MalformedLength @httpMalformedRequestTests([
215215
mediaType: "application/json",
216216
assertion: {
217217
contents: """
218-
{ "message" : "1 validation error detected. Value with length $inputLength:L at '/list/0' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
219-
"fieldList" : [{"message": "Value with length $inputLength:L at '/list/0' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/list/0"}]}"""
218+
{ "message" : "1 validation error detected. Value at '/list/0' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
219+
"fieldList" : [{"message": "Value at '/list/0' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/list/0"}]}"""
220220
}
221221
}
222222
},
@@ -252,8 +252,8 @@ apply MalformedLength @httpMalformedRequestTests([
252252
mediaType: "application/json",
253253
assertion: {
254254
contents: """
255-
{ "message" : "1 validation error detected. Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
256-
"fieldList" : [{"message": "Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/map"}]}"""
255+
{ "message" : "1 validation error detected. Value at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
256+
"fieldList" : [{"message": "Value at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/map"}]}"""
257257
}
258258
}
259259
},
@@ -292,8 +292,8 @@ apply MalformedLength @httpMalformedRequestTests([
292292
mediaType: "application/json",
293293
assertion: {
294294
contents: """
295-
{ "message" : "1 validation error detected. Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
296-
"fieldList" : [{"message": "Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/map"}]}"""
295+
{ "message" : "1 validation error detected. Value at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
296+
"fieldList" : [{"message": "Value at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/map"}]}"""
297297
}
298298
}
299299
},
@@ -327,8 +327,8 @@ apply MalformedLength @httpMalformedRequestTests([
327327
mediaType: "application/json",
328328
assertion: {
329329
contents: """
330-
{ "message" : "1 validation error detected. Value with length $inputLength:L at '/map/abc' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
331-
"fieldList" : [{"message": "Value with length $inputLength:L at '/map/abc' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/map/abc"}]}"""
330+
{ "message" : "1 validation error detected. Value at '/map/abc' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
331+
"fieldList" : [{"message": "Value at '/map/abc' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/map/abc"}]}"""
332332
}
333333
}
334334
},
@@ -369,8 +369,8 @@ apply MalformedLengthOverride @httpMalformedRequestTests([
369369
mediaType: "application/json",
370370
assertion: {
371371
contents: """
372-
{ "message" : "1 validation error detected. Value with length $inputLength:L at '/blob' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
373-
"fieldList" : [{"message": "Value with length $inputLength:L at '/blob' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/blob"}]}"""
372+
{ "message" : "1 validation error detected. Value at '/blob' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
373+
"fieldList" : [{"message": "Value at '/blob' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/blob"}]}"""
374374
}
375375
}
376376
},
@@ -403,8 +403,8 @@ apply MalformedLengthOverride @httpMalformedRequestTests([
403403
mediaType: "application/json",
404404
assertion: {
405405
contents: """
406-
{ "message" : "1 validation error detected. Value with length $inputLength:L at '/string' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
407-
"fieldList" : [{"message": "Value with length $inputLength:L at '/string' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/string"}]}"""
406+
{ "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
407+
"fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/string"}]}"""
408408
}
409409
}
410410
},
@@ -437,8 +437,8 @@ apply MalformedLengthOverride @httpMalformedRequestTests([
437437
mediaType: "application/json",
438438
assertion: {
439439
contents: """
440-
{ "message" : "1 validation error detected. Value with length 3 at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 4",
441-
"fieldList" : [{"message": "Value with length 3 at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 4", "path": "/minString"}]}"""
440+
{ "message" : "1 validation error detected. Value at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 4",
441+
"fieldList" : [{"message": "Value at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 4", "path": "/minString"}]}"""
442442
}
443443
}
444444
}
@@ -467,8 +467,8 @@ apply MalformedLengthOverride @httpMalformedRequestTests([
467467
mediaType: "application/json",
468468
assertion: {
469469
contents: """
470-
{ "message" : "1 validation error detected. Value with length 7 at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 6",
471-
"fieldList" : [{"message": "Value with length 7 at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 6", "path": "/maxString"}]}"""
470+
{ "message" : "1 validation error detected. Value at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 6",
471+
"fieldList" : [{"message": "Value at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 6", "path": "/maxString"}]}"""
472472
}
473473
}
474474
}
@@ -497,8 +497,8 @@ apply MalformedLengthOverride @httpMalformedRequestTests([
497497
mediaType: "application/json",
498498
assertion: {
499499
contents: """
500-
{ "message" : "1 validation error detected. Value with length $inputLength:L at '/list' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
501-
"fieldList" : [{"message": "Value with length $inputLength:L at '/list' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/list"}]}"""
500+
{ "message" : "1 validation error detected. Value at '/list' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
501+
"fieldList" : [{"message": "Value at '/list' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/list"}]}"""
502502
}
503503
}
504504
},
@@ -534,8 +534,8 @@ apply MalformedLengthOverride @httpMalformedRequestTests([
534534
mediaType: "application/json",
535535
assertion: {
536536
contents: """
537-
{ "message" : "1 validation error detected. Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
538-
"fieldList" : [{"message": "Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/map"}]}"""
537+
{ "message" : "1 validation error detected. Value at '/map' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
538+
"fieldList" : [{"message": "Value at '/map' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/map"}]}"""
539539
}
540540
}
541541
},
@@ -580,8 +580,8 @@ apply MalformedLengthQueryString @httpMalformedRequestTests([
580580
mediaType: "application/json",
581581
assertion: {
582582
contents: """
583-
{ "message" : "1 validation error detected. Value with length 0 at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
584-
"fieldList" : [{"message": "Value with length 0 at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/string"}]}"""
583+
{ "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
584+
"fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/string"}]}"""
585585
}
586586
}
587587
}

0 commit comments

Comments
 (0)