Skip to content

Commit bb7f346

Browse files
authored
fix ParamValidator failing on document trait (#4011)
1 parent fcf2555 commit bb7f346

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "bugfix",
3+
"category": "ParamValidator",
4+
"description": "fix the issue that the ParamValidator always fails on the document trait"
5+
}

Diff for: lib/param_validator.js

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ AWS.ParamValidator = AWS.util.inherit({
5353
validateStructure: function validateStructure(shape, params, context) {
5454
this.validateType(params, context, ['object'], 'structure');
5555

56+
if (shape.isDocument) return true;
57+
5658
var paramName;
5759
for (var i = 0; shape.required && i < shape.required.length; i++) {
5860
paramName = shape.required[i];

Diff for: test/param_validator.spec.js

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)