Skip to content

Support merging map traits? #2645

@kubukoz

Description

@kubukoz

Usecase: Adding traitValidators via apply. Or expanding another map-based trait.

@traitValidators(
    A: { message: "ints not allowed", selector: "integer" }
)
@trait
string T

apply T @traitValidators(
    B: { message: "strings not allowed", selector: "string" }
)

Currently, this emits an error in the apply because trait conflict resolution only merges list/set traits.

Is this something that Smithy could loosen the constraint on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions