Skip to content

Throw SerializationError when serializing error-corrected enum/intEnum members #722

Description

@Alan4506

Client error correction (added in #702) fills in a placeholder when a service omits a @required enum/intEnum member from a response, e.g. EnumClass._corrected("") or IntEnumClass._corrected(-1). Some shapes might be used as both responses and requests, so a response carrying a corrected placeholder can be reused as a request input. Today that placeholder serializes silently as "" / -1, sending an invented value the service never provided.

This should behave like an unknown union member, which already raises SerializationError("Unknown union variants may not be serialized.").

I'm creating this issue so we don't forget to raise SerializationError when serializing an enum/intEnum member flagged _smithy_corrected.

Important

This must NOT affect wire-unknown enum values (_smithy_unknown but not _smithy_corrected). Per the Smithy spec, clients "MUST provide the capability of sending and receiving unknown enum values" (enum, intEnum), so those must continue to serialize normally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions