smithy-lang / smithy-kotlin

Smithy code generator for Kotlin (in development)
Apache License 2.0
64 stars 26 forks source link

fix: correctly codegen waiters and paginators for resource operations #1064

Closed ianbotsf closed 2 months ago

ianbotsf commented 2 months ago

Issue \

Addresses https://github.com/awslabs/aws-sdk-kotlin/issues/900

Description of changes

Various parts of codegen tried to get all the operations a service supports via ServiceShape.allOperations which, despite the name, does not return all operations of the service, merely the ones listed in the service shape. Other operations available through resources were not considered.

This change uses the TopDownIndex's getContainedOperations method to find directly-attached operations and resource operations, ensuring that waiters and paginators are correctly codegenned for resource operations.

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