-
-
Notifications
You must be signed in to change notification settings - Fork 226
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
Tracking issue: spurious Maybe
s in request/response bodies
#739
Comments
I am a bit unsure about the Value field on the Parameter type of AWS Systems Manager (formerly known as SSM). It is required according to docs on These docs don't mention anything about optionality, but they do mention the field and supply it in their examples:
In the Go bindings, it is a pointer, which suggests that it is optional. But it seems like everything is a pointer. This piece of Parameter documentation claims it is not required: So what to do? Don't know whether I should make a PR. |
@ysangkok I moved your question to a new issue, otherwise this issue will get confusing over time. Actually, I think I'm going to lock it to prevent the from happening. |
At some point, the generator was changed to emit
Maybe
values for all optional fields, even for types that had a sensible "empty" value (e.g., maps and lists). Among other benefits, this made it possible to detect empty lists and maps in DynamoDBAttributeValue
s (before #724 introduced an AST and solved things properly).There's a big QoL downside to this, particularly for responses: it makes a lot of request/response fields look optional, and when handling responses you're forced to write partial code or handle errors that should never appear.
I've tried raising issues for these in botocore, but AWS service teams have a habit of not being very thorough when marking things as required in their service definitions (and changing this risks backwards-compat problems now).
Fixing these is not that difficult; it's just an additional
requiredFields
entry inconfigs/$SERVICE.json
and would make a good first PR. If you make an issue or PR about one of these, please:service config
scripts/generate --commit $serviceabbrev
(e.g.,dynamodb
)If you have questions about a specific field and want to discuss whether or not to make a PR, please create an issue for it, mention this issue in its description, and give it the
service config
label.The text was updated successfully, but these errors were encountered: