-
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
Add Smithy RPC v2 CBOR protocol #2212
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Add Smithy RPC v2 trait definition and implementation Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com> * Add support for wire formats * Address PR comments * Rename SmithyRpcV2* to just Rpcv2 * Finish refactor to just have Rpcv2 * Address PR comments. Remove the validator for now * Address comments from PR --------- Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>
* Implement Rpcv2TraitValidator and tests * Add missing license * Update smithy-protocols-traits/src/main/java/software/amazon/smithy/protocols/traits/Rpcv2TraitValidator.java Co-authored-by: Kevin Stich <kevin@kstich.com> * Address comments from PR * Make sure format is always set * Fix typo * Fix comment * Fix comment * Fix trailing whitespace --------- Co-authored-by: Kevin Stich <kevin@kstich.com>
This commit refactors the trait implementation to be specific to the CBOR wire format instead of taking a collection of possible wire formats, simplifying the process of resolving the protocol to use for generated code. It also moves the package to `smithy-protocol-traits`, removing the pluralization on `protocols`.
…test, and add the missing headers
…tation to clarify test.
sugmanue
approved these changes
Mar 25, 2024
lucix-aws
approved these changes
Mar 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
What do these changes do?
Adds a new Smithy wire protocol, Smithy RPC v2 CBOR (
@smithy.protocol#rpcv2Cbor
), that is an RPC protocol using the CBOR data format for payload transmission.Why are they important?
CBOR is a more performant encoding, both in time to encode and the resulting payload size, than both JSON and XML.
Testing
Spec builds and reads correctly. Protocol trait is used by services in the new
smithy-protocol-tests
package, which both aws/smithy-go (client) and smithy-lang/smithy-rs (service) pass.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.