Open ChronosWS opened 4 years ago
Verified that changing DnsConfig.dns_records
to pub dns_records: Option<Vec<DnsRecord>>
allows the request to succeed as expected. However, I see in botocore that servicediscovery has the following definition for DnsConfig
:
"DnsConfig":{
"type":"structure",
"required":["DnsRecords"],
...
If this is being used to determine whether a field is Option
al on types used in responses, then I don't think there is enough information provided by boto to do response generation like this statically. I am not comfortable submitting a PR for this because it seems like a potentially larger issue than just one field on one response...
Version: rusoto_core 0.42.0, rusoto_servicediscovery 0.42.0
Failing code snippet:
Result:
Looking at the generated
Service
(part of theGetServiceResponse
):and
DnsConfig
:But the actual response from AWS looks as follows:
It looks like perhaps that empty struct is not being seen as "absent" but as "present with no fields", and as such the required dns_records field on DnsConfig is barfing. This will be the normal response from a service in an HttpNamespace, which does not do any DNS registration.
Seems like dns_records should be
Option
al? I am not sure if you could determine this during generation from boto or not...