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

Reverse the logic of the protocol test to be in sync with the current… #1444

Merged

Conversation

sugmanue
Copy link
Contributor

… behavior

Issue #, if available:

Description of changes:

This change reverses the logic of the protocol test that asserts that we do not serialize empty lists. We currently do it for other SDK and some services rely on this behavior.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sugmanue sugmanue requested a review from a team as a code owner October 11, 2022 18:47
…ists

Currently both aws query and ec2 query do serialize empty lists
@sugmanue sugmanue force-pushed the empty-lists-are-serialized-protocol-test branch from f47b9f3 to 502258a Compare October 12, 2022 18:16
@sugmanue sugmanue merged commit 715b1d9 into smithy-lang:main Oct 28, 2022
@sugmanue sugmanue deleted the empty-lists-are-serialized-protocol-test branch October 28, 2022 23:15
syall pushed a commit to syall/aws-sdk-go-v2 that referenced this pull request Nov 11, 2022
Update serializing empty lists for query protocols (see references)
to pass protocol tests.

Previous Behavior:

`{ "ListArg": [] }` serializes to ``.

Current Behavior:

`{ "ListArg": [] }` serializes to `?ListArg=`.

References:

- smithy-lang/smithy#1444
- [AWS query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-query-protocol.html)
- [AWS EC2 query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-ec2-query-protocol.html)
syall pushed a commit to syall/aws-sdk-go-v2 that referenced this pull request Nov 11, 2022
Update serializing empty lists for query protocols (see references)
to pass protocol tests.

Previous Behavior:

`{ "ListArg": [] }` serializes to ``.

Current Behavior:

`{ "ListArg": [] }` serializes to `?ListArg=`.

References:

- smithy-lang/smithy#1444
- [AWS query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-query-protocol.html)
- [AWS EC2 query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-ec2-query-protocol.html)
syall pushed a commit to syall/aws-sdk-go-v2 that referenced this pull request Nov 11, 2022
Update serializing empty lists for query protocols (see references)
to pass protocol tests.

Previous Behavior:

`{ "ListArg": [] }` serializes to ``.

Current Behavior:

`{ "ListArg": [] }` serializes to `?ListArg=`.

References:

- smithy-lang/smithy#1444
- [AWS query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-query-protocol.html)
- [AWS EC2 query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-ec2-query-protocol.html)
syall pushed a commit to syall/aws-sdk-go-v2 that referenced this pull request Nov 11, 2022
Update serializing empty lists for query protocols (see references)
to pass protocol tests.

Previous Behavior:

`{ "ListArg": [] }` serializes to ``.

Current Behavior:

`{ "ListArg": [] }` serializes to `?ListArg=`.

References:

- smithy-lang/smithy#1444
- [AWS query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-query-protocol.html)
- [AWS EC2 query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-ec2-query-protocol.html)
syall pushed a commit to syall/aws-sdk-go-v2 that referenced this pull request Jan 28, 2023
Update serializing empty lists for query protocols (see references)
to pass protocol tests.

Previous Behavior:

`{ "ListArg": [] }` serializes to ``.

Current Behavior:

`{ "ListArg": [] }` serializes to `?ListArg=`.

References:

- smithy-lang/smithy#1444
- [AWS query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-query-protocol.html)
- [AWS EC2 query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-ec2-query-protocol.html)
syall pushed a commit to syall/aws-sdk-go-v2 that referenced this pull request Jan 30, 2023
Update serializing empty lists for query protocols (see references)
to pass protocol tests.

Previous Behavior:

`{ "ListArg": [] }` serializes to ``.

Current Behavior:

`{ "ListArg": [] }` serializes to `?ListArg=`.

References:

- smithy-lang/smithy#1444
- [AWS query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-query-protocol.html)
- [AWS EC2 query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-ec2-query-protocol.html)
syall pushed a commit to syall/aws-sdk-go-v2 that referenced this pull request Jan 31, 2023
Update serializing empty lists for query protocols (see references)
to pass protocol tests.

Previous Behavior:

`{ "ListArg": [] }` serializes to ``.

Current Behavior:

`{ "ListArg": [] }` serializes to `?ListArg=`.

References:

- smithy-lang/smithy#1444
- [AWS query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-query-protocol.html)
- [AWS EC2 query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-ec2-query-protocol.html)
syall pushed a commit to syall/aws-sdk-go-v2 that referenced this pull request Jan 31, 2023
Update serializing empty lists for query protocols (see references)
to pass protocol tests.

Previous Behavior:

`{ "ListArg": [] }` serializes to ``.

Current Behavior:

`{ "ListArg": [] }` serializes to `?ListArg=`.

References:

- smithy-lang/smithy#1444
- [AWS query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-query-protocol.html)
- [AWS EC2 query
  protocol](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-ec2-query-protocol.html)
alextwoods added a commit to alextwoods/aws-sdk-ruby-v4 that referenced this pull request Jul 20, 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