-
Notifications
You must be signed in to change notification settings - Fork 196
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
Unnecessary use of Option<T> on required fields #837
Comments
Take a look at awslabs/aws-sdk-rust#163 and feel free to join in on the conversation there. I think the best way to tell if a field is required right now is to look at the service's API docs, which typically state the requiredness of each field. For example, for CreateHostedZone, the fields have a This isn't ideal though, and we're working on improving it. |
Linked issue: #1095 |
@llgerard Just want to note that #1095 is unrelated to this issue, since #1095 is for the server implementation, while this one is for the client. The client does not have as much freedom as the server, since it needs to be able to work with older versions of the Smithy model, and the spec says that removing the |
I'm going to close this in favor of aws-sdk-rust#536, which covers the same subject. |
It's being tracked in #1767 on the smithy-rs side. |
An example is
HostedZone
, which has required fields that are wrapped inOption
.The Go API Reference states that those fields are required.
The JS API also has a similar typing problem when generating from Smithy . Their
HostedZone
has the typestring | undefined
forid
. There is an open issue: Why is everything possibly undefined? (& other typing/doc questions)Is there an authoritative source on whether fields are required for the AWS SDK?
It would be nice to have direct access to fields if they are always
Some<T>
🙂References
[1] HostedZone, Go API Reference
[2] HostedZone, JavaScript v3 API Reference
The text was updated successfully, but these errors were encountered: