amplify-swift
amplify-swift copied to clipboard
AWSAPIPlugin decoding behavior alignment with Android
on iOS, we can first get parity in behavior: "if there is only one element at data, deserialize to it" as API behavior change, this will allow the documentation to be updated to omit the decodePath.
for elements which is under "data.items", we'll need custom deserialization logic in the plugin code to support this like Android has.
until both of these changes happen, APIPlugin on iOS requires the decodePath to be set for both scenarios
- getting element under "data"
- getting list of elements under "data.items" for list queries
Originally posted by @lawmicha in https://github.com/aws-amplify/docs/pull/2141/review_comment/create
Related PR https://github.com/aws-amplify/amplify-ios/pull/714#issuecomment-680153846
we have decided to hold off on this due to the breaking change on customers (3rd point under customer impact, in the description)
I don't think this is still worth doing due to the breaking change, at least not in the current description. Re-open with more details detailing the specification of the API signature and behaviors for both platforms to align to, then we can address this properly. Otherwise, we won't know exactly what is "parity"