Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ParamValidator failing on document trait #4011

Merged
merged 1 commit into from Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-ParamValidator-b021ee76.json
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "ParamValidator",
"description": "fix the issue that the ParamValidator always fails on the document trait"
}
2 changes: 2 additions & 0 deletions lib/param_validator.js
Expand Up @@ -53,6 +53,8 @@ AWS.ParamValidator = AWS.util.inherit({
validateStructure: function validateStructure(shape, params, context) {
this.validateType(params, context, ['object'], 'structure');

if (shape.isDocument) return true;

var paramName;
for (var i = 0; shape.required && i < shape.required.length; i++) {
paramName = shape.required[i];
Expand Down
11 changes: 11 additions & 0 deletions test/param_validator.spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.