Skip to content

Models transformed with filterShapes may no longer pass endpoint ruleset validation #3190

Description

@ianbotsf

The AWS SDK for Kotlin uses a Smithy transformer to remove operations from service models in order to generate minimized service clients for use in credentials providers such as STS, SSO, Signin, etc. Removing operations via Smithy's ModelTransformer.filterShapes API does not update the endpoint ruleset (or its BDD equivalent) in the service model. This can lead to a situation where ruleset parameters defined in a service's endpointRuleSet trait are not resolvable against the set of parameters defined in operations' staticContextParams, operationContextParams, etc. Essentially, ruleset parameters may become orphaned by shape removals. This is turn causes Smithy's RuleSetParameterValidator to fail.

Smithy's built-in APIs for transforming models should be ruleset-aware so that they do not cause validators to fail on otherwise-valid transformations. Alternatively, Smithy could provide additional APIs for transforming rulesets which could be incorporated into calling code to achieve the same effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.

    Type

    No type

    Fields

    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