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

Introduce HttpBindingResolver to abstract HttpBindingIndex #448

Merged
merged 5 commits into from
Jun 2, 2021
Merged

Introduce HttpBindingResolver to abstract HttpBindingIndex #448

merged 5 commits into from
Jun 2, 2021

Conversation

jdisanti
Copy link
Collaborator

@jdisanti jdisanti commented Jun 1, 2021

This abstracts HttpBindingIndex behind HttpBindingResolver so that the HTTP binding code can be re-used for protocols that don't use HTTP traits (issue #442). The AwsQuery protocol is refactored to take advantage of this, but I held off on refactoring AwsJson since a lot of that will be reworked in the JSON refactor.

Also added a test for the overall AwsQuery protocol generator.

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

@jdisanti jdisanti requested a review from rcoh June 1, 2021 22:58
Copy link
Collaborator

@rcoh rcoh left a comment

Choose a reason for hiding this comment

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

will take another pass tomorrow morning but this looks great

@@ -203,7 +219,7 @@ class RequestBindingGenerator(
/**
* Format [member] in the when used as an HTTP header
*/
private fun headerFmtFun(target: Shape, member: MemberShape, targetName: String): String {
Copy link
Collaborator

Choose a reason for hiding this comment

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

might make these extension functions on RustWriter

Copy link
Collaborator

@rcoh rcoh left a comment

Choose a reason for hiding this comment

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

lgtm

@jdisanti jdisanti merged commit b4f57b7 into smithy-lang:main Jun 2, 2021
@jdisanti jdisanti deleted the http-index branch August 6, 2021 20:02
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.

2 participants