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
Conversation
A new generated diff is ready to view.
|
A new doc preview is ready to view. |
.../amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt
Show resolved
Hide resolved
// 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() |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified the comment.
.../amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt
Show resolved
Hide resolved
...n/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpProtocolGenerator.kt
Show resolved
Hide resolved
There was a problem hiding this 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.
A new doc preview is ready to view. |
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.
0562e92
to
a42da20
Compare
A new generated diff is ready to view.
|
A new doc preview is ready to view. |
A new doc preview is ready to view. |
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.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.