AvdLee / appstoreconnect-swift-sdk

The Swift SDK to work with the App Store Connect API from Apple.
Other
1.48k stars 198 forks source link

Wrong response type for getAllCertificates call #72

Closed ristkof closed 4 years ago

ristkof commented 4 years ago

This call has a response that corresponds to ProfileDevicesLinkagesResponse, not ProfileResponse. According to the documentation it should be a CertificatesResponse (see https://developer.apple.com/documentation/appstoreconnectapi/list_all_certificates_in_a_profile), but that's not correct either, since the attributes are missing from the certificates in the data array.

An alternative option could be to make the attributes optional in certificate and use CertificatesResponse here.

For now I propose to abuse ProfileDevicesLinkagesResponse or else create a new response type specifically for this.

What do you think?

Screenshot of Charles-dump attached (with some private bits cut out).

Screenshot 2020-03-02 at 16 16 37
AvdLee commented 4 years ago

@ristkof to me it makes the most sense to create a new response for this that matches the outcome. Would you mind doing that instead?

FYI; I'm working on fixing CI today, so you don't have to worry about that! And thanks for your contribution 💪

SwiftLeeBot commented 4 years ago
Messages
:book: View more details on Bitrise
:book: AppStoreConnect-Swift-SDK: Executed 149 tests, with 0 failures (0 unexpected) in 0.587 (1.148) seconds

AppStoreConnect_Swift_SDK.framework: Coverage: 81.63

File Coverage
GetAllCertificateIdsInProfile.swift 0.0% ⚠️

Generated by :no_entry_sign: Danger Swift against 296e8444a507a5a2941e9ea8f55b52e885a8760c

ristkof commented 4 years ago

@AvdLee Changed as requested.

SwiftLeeBot commented 4 years ago

Congratulations! :tada: This was released as part of Release 1.0.1 :rocket: