Skip to content

Conversation

@adamthom-amzn
Copy link
Contributor

Description of changes:
Streaming blob member inputs and design-time media types need special consideration during code generation, and the protocol tests were not accounting for the need for a validation customizer. Also, we weren't correctly generating validate for empty structures.

This does not impact SDK generation. Output of git status after yarn generate-clients:

On branch main
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   protocol_tests/aws-query/tests/functional/awsquery.spec.ts

And that diff has the expected content

diff --git a/protocol_tests/aws-query/tests/functional/awsquery.spec.ts b/protocol_tests/aws-query/tests/functional/awsquery.spec.ts
index a26a08b573..01b6921209 100644
--- a/protocol_tests/aws-query/tests/functional/awsquery.spec.ts
+++ b/protocol_tests/aws-query/tests/functional/awsquery.spec.ts
@@ -548,9 +548,7 @@ it("QueryInvalidGreetingError:Error:GreetingWithErrors", async () => {
 /**
  * Parses customized XML errors
  */
-// Manually skipping to unblock smithy-1.8.x update.
-// TODO: Consume AWSQueryError trait as a follow-up.
-it.skip("QueryCustomizedError:Error:GreetingWithErrors", async () => {
+it("QueryCustomizedError:Error:GreetingWithErrors", async () => {
   const client = new QueryProtocolClient({
     ...clientParams,
     requestHandler: new ResponseDeserializationTestHandler(

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@adamthom-amzn adamthom-amzn requested a review from a team as a code owner June 21, 2021 18:48
getSanitizedMemberName(member), param, member.getMemberName());
String optionalSuffix = "";
if (member.getMemberTrait(model, MediaTypeTrait.class).isPresent()
&& model.expectShape(member.getTarget()) instanceof StringShape) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also a .isStringShape() method but eh

@JordonPhillips
Copy link
Contributor

JordonPhillips commented Jun 22, 2021

Also worth noting, for the JS team member that review this, that that diff shown should no longer happen as of aws/aws-sdk-js-v3#2506 as the skip will be generated.

Streaming blob member inputs and design-time media types need special consideration during code generation, and the protocol tests were not accounting for the need for a validation customizer.
@adamthom-amzn adamthom-amzn merged commit 09f87a7 into smithy-lang:main Jun 24, 2021
@adamthom-amzn adamthom-amzn deleted the fix-validation branch June 24, 2021 23:46
srchase pushed a commit that referenced this pull request Mar 23, 2023
srchase pushed a commit that referenced this pull request Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants