amplify-swift icon indicating copy to clipboard operation
amplify-swift copied to clipboard

AWSAPIPlugin decoding behavior alignment with Android

Open lawmicha opened this issue 5 years ago • 1 comments

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

  1. getting element under "data"
  2. 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

lawmicha avatar Aug 03 '20 19:08 lawmicha

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)

lawmicha avatar Jan 22 '21 20:01 lawmicha

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"

lawmicha avatar Aug 10 '23 14:08 lawmicha