Skip to content
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

Wrong response type for getAllCertificates call #72

Merged
merged 7 commits into from
Mar 19, 2020
Merged

Wrong response type for getAllCertificates call #72

merged 7 commits into from
Mar 19, 2020

Conversation

ristkof
Copy link
Contributor

@ristkof ristkof commented Mar 2, 2020

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

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?
@ristkof ristkof changed the title Wrong response type for this call Wrong response type for getAllCertificates call Mar 2, 2020
@AvdLee
Copy link
Owner

AvdLee commented Mar 8, 2020

@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 💪

@AvdLee AvdLee self-requested a review as a code owner March 8, 2020 13:53
@SwiftLeeBot
Copy link
Collaborator

SwiftLeeBot commented Mar 8, 2020

Messages
📖

View more details on Bitrise

📖 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 🚫 Danger Swift against 296e844

@ristkof
Copy link
Contributor Author

ristkof commented Mar 13, 2020

@AvdLee Changed as requested.

Sources/Models/ProfileCertificatesResponse.swift Outdated Show resolved Hide resolved
Repository owner deleted a comment from ristkof Mar 16, 2020
@AvdLee AvdLee merged commit 873e87f into AvdLee:master Mar 19, 2020
@SwiftLeeBot
Copy link
Collaborator

Congratulations! 🎉 This was released as part of Release 1.0.1 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants