Open robin-aws opened 8 months ago
Validators for traits are pluggable as well. Here's where a bunch of the validators for core traits are declared: https://github.com/smithy-lang/smithy/blob/main/smithy-model/src/main/resources/META-INF/services/software.amazon.smithy.model.validation.Validator
@positional intentionally changes the rules around backwards compatibility in the name of a cleaner and simpler generated code API experience. The documentation of the trait is fairly clear about this, but Smithy tooling like
smithy-diff
is not aware of it. Especially if this trait is used in other contexts beyond this, it would be worth emitting a warning at model validation time.There are similar gaps for
@reference
as well: Smithy itself will let you use an empty structure tagged with@reference
directly as the output of an operation, which is a natural mistake.