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

Deserialize empty collections from the query string into None #1050

Merged
merged 2 commits into from Jan 11, 2022

Conversation

david-perez
Copy link
Contributor

We were instead providing empty collections e.g. Some(Vec::new()),
which makes protocol tests fail.

This commit also passes Smithy member names through the symbol
provider to obtain safe variable names.

This commit also adds some plumbing to the server protocol test case
generation to fix broken request test definitions in the
awslabs/smithy project.

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

@david-perez david-perez requested a review from a team as a code owner January 7, 2022 18:28
@github-actions
Copy link

github-actions bot commented Jan 7, 2022

A new generated diff is ready to view.

@github-actions
Copy link

github-actions bot commented Jan 7, 2022

A new doc preview is ready to view.

Comment on lines 572 to 584
// TODO This test does not pass, even after fixing it with this function, because, `NaN` != `NaN`.
val params = Node.parse("""{
"queryFloat": "NaN",
"queryDouble": "NaN",
"queryParamsMapOfStringList": {
"Float": ["NaN"],
"Double": ["NaN"]
}
}""".trimIndent()).asObjectNode().get()

return testCase.toBuilder().params(params).build()
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure why are you doing this if it doesn't work. Is the comment outdated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Clarified the comment.

Copy link
Contributor

@crisidev crisidev left a comment

Choose a reason for hiding this comment

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

Minor comments and questions, LGTM.

@github-actions
Copy link

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

We were instead providing empty collections e.g. `Some(Vec::new())`,
which makes protocol tests fail.

This commit also passes Smithy member names through the symbol provider
to obtain safe variable names.

This commit also adds some plumbing to the server protocol test case
generation to fix broken request test definitions in the
`awslabs/smithy` project.
@github-actions
Copy link

A new generated diff is ready to view.

@github-actions
Copy link

A new doc preview is ready to view.

@david-perez david-perez enabled auto-merge (squash) January 11, 2022 10:28
@github-actions
Copy link

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

@david-perez david-perez merged commit 8fe1083 into main Jan 11, 2022
@david-perez david-perez deleted the davidpz-fix-query-string-tests branch January 11, 2022 10:45
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.

None yet

2 participants