smithy-lang / smithy

Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.
https://smithy.io
Apache License 2.0
1.7k stars 201 forks source link

Validator for duplicate names in iamResource trait #2293

Closed tkyadav closed 1 month ago

tkyadav commented 1 month ago

Background

IamResourceTraitValidator does not validates conflicting resource names in IAM space. For example, assume there exists two resource shapes Resource1 and Resource2. If I add trait @iamResource(name: "Resource1") on Resource2, there are conflicting resource names in the IAM space. This behavior is not detected/prevented by any validator in smithy.

Testing

Wrote a unit test for the validator.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.