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
RPCv2 and cbor support #3006
base: version-3
Are you sure you want to change the base?
RPCv2 and cbor support #3006
Conversation
build_tools/aws-sdk-code-generator/spec/protocol_tests_spec_helper.rb
Outdated
Show resolved
Hide resolved
gems/aws-sdk-core/lib/aws-sdk-core/cbor/engines/default_cbor_engine.rb
Outdated
Show resolved
Hide resolved
|
||
module Aws | ||
module Cbor | ||
Tagged = Struct.new(:tag, :value) do |
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.
the cbor
gem also defines its own Tagged class: https://github.com/cabo/cbor-ruby/blob/master/doclib/cbor/tagged.rb#L6
Which it will return when decoding items.
I think we have two options on how to handle this:
- In our cbor gem engine adaptor, we replace any Cbor Tagged objects with Aws::Taged objects.
- We ensure the intrefaces are the same (ie, remove the use of Struct and just define a class with attr accessors) for our Tagged object. Then just rely no ruby's duck typing.
This reverts commit cec94b1.
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.
Nice - updates look good
'union' => false, # should remain false | ||
'streaming' => true, | ||
'requiresLength' => true, | ||
'union' => false, # not ignored - should remain false |
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.
"not ignored" is slightly confusing. Maybe "handled separately"
Object.send(:remove_const, :ProtocolsJsonQuery) | ||
end | ||
|
||
it 'selects query if is the only choice' do |
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 you meant to say, selects query if it is the only choice
here like line 20
end | ||
|
||
def end_indefinite_collection | ||
# write the stop sequenece |
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.
Typo: sequence
WIP for implementing cbor and smithy rpcv2
Encoder and decoder created by @alextwoods