Skip to content

chore(core/protocols): http binding and cbor serializer refactoring #1659

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

Merged
merged 2 commits into from
Aug 5, 2025

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Aug 5, 2025

This refactors two areas:

  • some HTTP binding serde code has been moved from HttpProtocol to HttpBindingProtocol. Because RpcProtocol extends HttpProtocol, HttpProtocol should not handle any HTTP binding traits. RPC models generally don't have any http binding traits, but the correct course of action is to ignore them rather than expecting the model to remove them.

For example, hypothetically, the model could declare support for one RPC protocol and one REST protocol. In this case, the http binding traits must remain in the model.

  • Some serialization transform code for CBOR has been moved from a separate internal function to the actual CborShapeSerializer class. The external function was initially planned for reuse, but this is no longer the case.

@kuhe kuhe requested a review from a team as a code owner August 5, 2025 19:20
@kuhe kuhe marked this pull request as draft August 5, 2025 19:20
@kuhe kuhe changed the title schema/http binding chore(core/protocols): http binding and cbor serializer refactoring Aug 5, 2025
@kuhe kuhe force-pushed the schema/http-binding branch from 3334b2b to be3c133 Compare August 5, 2025 19:22
@kuhe kuhe force-pushed the schema/http-binding branch from be3c133 to c92969a Compare August 5, 2025 19:29
@kuhe kuhe marked this pull request as ready for review August 5, 2025 19:29
@kuhe kuhe mentioned this pull request Aug 5, 2025
2 tasks
@kuhe kuhe merged commit 64e033f into smithy-lang:main Aug 5, 2025
11 checks passed
@kuhe kuhe deleted the schema/http-binding branch August 5, 2025 19:50
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