-
Notifications
You must be signed in to change notification settings - Fork 192
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
Protocol tests for ACCEPT header with * #1648
Conversation
Signed-off-by: Daniele Ahmed <[email protected]>
Signed-off-by: Daniele Ahmed <[email protected]>
ef6adb7
to
b6b10a6
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
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.
Can you link to the Smithy PR in a TODO somewhere in the model? So that we don't forget to remove this test when we upgrade to the next Smithy version.
codegen-test/model/misc.smithy
Outdated
@output | ||
structure AcceptHeaderStarServiceOutput {} | ||
@input | ||
structure AcceptHeaderStarServiceInput {} |
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 we should dispense of superfluous modeling in the protocol tests, even if they are best practices, to keep the files minimal so readers can easily focus on the modeling aspects of the test that are strictly relevant to what it is testing.
So, e.g. not using @input/@output
, using a single AcceptHeaderStarServiceInputOutput
structure, not using @idempotent
etc.
Signed-off-by: Daniele Ahmed <[email protected]>
A new generated diff is ready to view.
A new doc preview is ready to view. |
@@ -18,6 +18,7 @@ service MiscService { | |||
ResponseCodeRequiredOperation, | |||
ResponseCodeHttpFallbackOperation, | |||
ResponseCodeDefaultOperation, | |||
AcceptHeaderStarService, |
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.
Shouldn't this be added to codegen-server-test
?
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.
It's a symlink:
$ ls -l codegen-server-test/model/misc.smithy
codegen-server-test/model/misc.smithy -> ../../codegen-test/model/misc.smithy
I added a appliesTo: "server",
to run those tests only in the server.
A new generated diff is ready to view.
A new doc preview is ready to view. |
It was called out in http-rs/http-types#349 that values can take a quoted string in the form of e.g. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
Add protocol tests for #1646
Testing
./gradlew :codegen-server-test:test && ./gradlew :codegen-test:test
Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesCHANGELOG.next.toml
if I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.