-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for nullable struct members when generating AWS SDKs #2916
Merged
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
9c17050
add support for nullable struct members when generating AWS SDKs
Velfi b1c7ec5
add CHANGELOG.next.toml entries
Velfi 0f27839
fix SDK adhoc tests config generation
Velfi 81f428b
fix XML parseStructure
Velfi 633c257
Merge branch 'main' into zhessler-nullability-now!
Velfi 266f54f
fix server codegen issue
Velfi 86dc322
remove TODO
Velfi a5565a3
update route53 resource ID trimmer
Velfi 2d20462
add back the prefix loop that I accidentally removed
Velfi acff7bd
more fixing for route53
Velfi 976f3a2
fix query serializer generator ref
Velfi 397c4ab
fix the QuerySerializerGenerator correctly
Velfi 80bb768
fix idempotency token generation
Velfi a44ae99
no really, fix idempotency token generation
Velfi 916265a
fix serde bugs
Velfi 761c1e4
fix more tests
Velfi 36b7127
fix server client and eventstream stuff
Velfi 3cf8288
Merge branch 'main' into zhessler-nullability-now!
Velfi 7e464cc
remove insurmountable comma
Velfi d2b2c55
fix another server example
Velfi 505c778
Merge branch 'main' into zhessler-nullability-now!
Velfi f0e4a1f
fix gradle build config typo
Velfi ae6a636
Update codegen-client/src/main/kotlin/software/amazon/smithy/rust/cod…
Velfi 491ca43
respond to PR comments
Velfi 66fbddb
Merge branch 'main' into zhessler-nullability-now!
Velfi c4b9958
add missing author to changelog
Velfi dac4679
update CHANGELOG
Velfi b0c63c9
Merge branch 'main' of github.com:awslabs/smithy-rs into zhessler-nul…
rcoh 5e6f6b9
Fix endpoints decorator test
rcoh 94c8dbb
Create ClientBuilderInstatiator & manuall create BuildError
rcoh cd5e33c
Update ChangeLog
rcoh 1374e95
Fix server
rcoh e661075
Merge branch 'main' of github.com:awslabs/smithy-rs into zhessler-nul…
rcoh 09c02f7
Fix unit tests
rcoh b417977
Add a default instantiator that works for tests
rcoh 0bffcc0
add protocol test for error correction & nullability
rcoh eee07db
Merge branch 'main' of github.com:awslabs/smithy-rs into zhessler-nul…
rcoh 58cf184
Add nullability test and fix some bugs
rcoh 7a4fd41
A few more fixes
rcoh e75ad16
wip
rcoh 99de898
Fix request id accessor when it is marked as required
rcoh 969e32f
Refactor && remove println
rcoh 7de1892
Fix unit test & add an ignore for useless question mark
rcoh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
$version: "1.0" | ||
|
||
namespace com.amazonaws.testservice | ||
|
||
use aws.api#service | ||
use aws.protocols#restJson1 | ||
|
||
@restJson1 | ||
@title("Test Service") | ||
@service(sdkId: "Test") | ||
@aws.auth#sigv4(name: "test-service") | ||
service RequiredValues { | ||
operations: [TestOperation] | ||
} | ||
|
||
@http(method: "GET", uri: "/") | ||
operation TestOperation { | ||
errors: [Error] | ||
} | ||
|
||
@error("client") | ||
structure Error { | ||
@required | ||
requestId: String | ||
|
||
@required | ||
message: String | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,31 +28,36 @@ async fn create_table(client: &Client, table_name: &str) { | |
KeySchemaElement::builder() | ||
.attribute_name("year") | ||
.key_type(KeyType::Hash) | ||
.build(), | ||
.build() | ||
.unwrap(), | ||
) | ||
.key_schema( | ||
KeySchemaElement::builder() | ||
.attribute_name("title") | ||
.key_type(KeyType::Range) | ||
.build(), | ||
.build() | ||
.unwrap(), | ||
) | ||
.attribute_definitions( | ||
AttributeDefinition::builder() | ||
.attribute_name("year") | ||
.attribute_type(ScalarAttributeType::N) | ||
.build(), | ||
.build() | ||
.unwrap(), | ||
) | ||
.attribute_definitions( | ||
AttributeDefinition::builder() | ||
.attribute_name("title") | ||
.attribute_type(ScalarAttributeType::S) | ||
.build(), | ||
.build() | ||
.unwrap(), | ||
Comment on lines
48
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. side note: I wonder if we want this API to accept There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. put another way, what if users could pass a builder directly? |
||
) | ||
.provisioned_throughput( | ||
ProvisionedThroughput::builder() | ||
.read_capacity_units(10) | ||
.write_capacity_units(10) | ||
.build(), | ||
.build() | ||
.unwrap(), | ||
) | ||
.send() | ||
.await | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change
build
totry_build
and add abuild
that panics?