Skip to content

ParamValidator fails to properly validate document type trait #3991

Closed
@JavierLuna

Description

@JavierLuna

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
I'm using Smithy's document type trait to generate an SDK. The generation itself goes well, but when attempting to use it to call my service, I get an UnexpectedParameter: Unexpected key 'test' found in params.myDocumentType.

The validation error appears to come from ParamValidator, I'm guessing #3808 did not adapt parameter validation.

Disabling paramValidation works: The SDK does the call and the service processes it correctly.

Is the issue in the browser/Node.js?
Node.js

If on Node.js, are you running this on AWS Lambda?
Local

Details of the browser/Node.js version

$ node -v
v14.17.0

SDK version number
Example: v2.1007.0

To Reproduce (observed behavior)
Attempt to make any call to a service that has a property with the document type trait.

Expected behavior
Parameter validation correctly validates my document property and makes the call to my service.

Screenshots
No

Additional context
No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions