@required
in document
shapes violated over the wire
#3735
Labels
breaking-change
This will require a breaking change
bug
Something isn't working
client
server
Rust server SDK
This bug affects both clients and servers. Consider:
Since the
document
member shape is@required
, these two JSON payloads should not be valid over the wire:In both, a value is not provided for the required member shape. Hence:
However, all 4 are currently possible with smithy-rs. This is because, regardless if we generate
aws_smithy_types::Document
orOption<aws_smithy_types::Document>
as the Rust type for the member shape (as per the structure member optionality rules), theaws_smithy_types::Document::Null
variant always exists (it's a runtime type crate), so a user can always set it for the member shape, e.g.:Indeed, this protocol test passes just fine:
Likewise, our deserializers deserialize both JSON payloads by setting
aws_smithy_types::Document::Null
.The text was updated successfully, but these errors were encountered: