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

Members with the @httpQuery trait are mishandled in responses and response tests #1500

Closed
jbelkins opened this issue May 15, 2024 · 1 comment
Assignees
Labels
bug This issue is a bug.

Comments

@jbelkins
Copy link
Contributor

Describe the bug

When a response includes a member with the @httpQuery trait, that trait is to be ignored and the value for that member is to be read from the response.

Instead, the member is set to nil and is excluded from equality checks during protocol response tests.

As a result, tests such as this one pass even though the logic being tested is incorrect in smithy-swift:
https://github.com/smithy-lang/smithy/blob/ae319f42ebd611d6564a9715089931905acbf315/smithy-aws-protocol-tests/model/restXml/http-query.smithy#L362

Expected Behavior

The test linked above should pass after checking all members of the response for equality.

Current Behavior

The linked test passes, but only because the member marked with the @httpQuery trait is not tested for equality.

Reproduction Steps

  • Remove the .filter { ... } statement here, which excludes members marked with the @httpQuery trait from equality evaluation when comparing results of a response protocol test.
  • Generate and run protocol tests.
  • The test linked above will fail due to mismatch of the actual & expected output.

Possible Solution

No response

Additional Information/Context

No response

AWS SWIFT SDK version used

main

Compiler and Version used

Xcode 15.4

Operating System and version

macOS 14.4.1

@jbelkins
Copy link
Contributor Author

Released in AWS SDK for Swift 0.44.0
https://github.com/awslabs/aws-sdk-swift/releases/tag/0.44.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

1 participant