-
Notifications
You must be signed in to change notification settings - Fork 218
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
Http response code #1241
Http response code #1241
Conversation
These tests ensure that * @required and @httpResponseCode are correctly handled * @http's code is used in place of @httpResponseCode when the latter is not used They were not handled correctly in smithy-lang/smithy-rs#1229. Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
CI fails due to some problems with cloudflare |
smithy-aws-protocol-tests/model/restJson1/http-response-code.smithy
Outdated
Show resolved
Hide resolved
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
@srchase can you please restart the checks? |
This test ensures that servers handle @httpResponseCode being @required.""", | ||
protocol: restJson1, | ||
code: 201, | ||
body: "", |
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.
See similar tests https://github.com/awslabs/smithy/blob/ededf6ba2334f1d006f3c76a257c8812f2f17497/smithy-aws-protocol-tests/model/restJson1/empty-input-output.smithy#L147-L159 and https://github.com/awslabs/smithy/blob/ededf6ba2334f1d006f3c76a257c8812f2f17497/smithy-aws-protocol-tests/model/restJson1/empty-input-output.smithy#L219-L221
server implementations are expected to respond with a JSON object regardless of if the output parameters are empty
You should change these tests to be similar to the above.
I think they way these tests are defined, it would have failed in the TypeScript SSDK - example
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.
Thanks @gosar, updated
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 think they way these tests are defined, it would have failed in the TypeScript SSDK - example
Would it be useful to add some tests from those in this CI?
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
|
Issue #, if available: in smithy-rs, smithy-lang/smithy-rs#1229
Description of changes:
Add tests for http response code. These tests ensure that
@required
and@httpResponseCode
are correctly handled@http
's code is used in place of@httpResponseCode
when the latter is not usedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.