Refactor `redactIfNecessary` function (#1746)
It's useful to call `redactIfNecessary` on arbitrary shape types, not only member shapes. It is now an extension function on `Shape`, with a specialization on `MemberShape`, since note that the `sensitive` trait cannot be applied to member shapes [0, 1], so we traverse to its target directly. Ultimately this is just to make the diff of #1342 lighter. [0]: https://awslabs.github.io/smithy/1.0/spec/core/documentation-traits.html#sensitive-trait [1]: https://awslabs.github.io/smithy/1.0/spec/core/documentation-traits.html#sensitive-trait
Loading
Please register or sign in to comment