-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly codegen waiters and paginators for resource operations (…
- Loading branch information
Showing
7 changed files
with
235 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"id": "e26e1980-ee66-4d9d-99b5-6ee0f1f3901d", | ||
"type": "bugfix", | ||
"description": "Correctly generate waiters and paginators for resource operations", | ||
"issues": [ | ||
"awslabs/aws-sdk-kotlin#900" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...esources/software/amazon/smithy/kotlin/codegen/simple-service-with-resource-waiter.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
$version: "1.0" | ||
namespace com.test | ||
|
||
use smithy.waiters#waitable | ||
|
||
service Test { | ||
version: "1.0.0" | ||
resources: [ | ||
Foo | ||
] | ||
} | ||
|
||
resource Foo { | ||
identifiers: { id: String } | ||
read: DescribeFooRequired | ||
} | ||
|
||
@readonly | ||
@waitable( | ||
FooRequiredExists: { | ||
documentation: "Wait until a foo exists with required input", | ||
acceptors: [ | ||
{ | ||
state: "success", | ||
matcher: { | ||
success: true | ||
} | ||
}, | ||
{ | ||
state: "retry", | ||
matcher: { | ||
errorType: "NotFound" | ||
} | ||
} | ||
] | ||
} | ||
) | ||
operation DescribeFooRequired { | ||
input: DescribeFooRequiredInput, | ||
output: DescribeFooOutput, | ||
errors: [NotFound, UnknownError] | ||
} | ||
|
||
structure DescribeFooRequiredInput { | ||
@required | ||
id: String | ||
} | ||
|
||
structure DescribeFooOutput { | ||
name: String | ||
} | ||
|
||
@error("client") | ||
structure NotFound {} | ||
|
||
@error("server") | ||
structure UnknownError {} |