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

Regenerated code for App Store Connect API 2.2 changes #220

Merged
merged 7 commits into from
Mar 16, 2023

Conversation

Workshed
Copy link
Contributor

@Workshed Workshed commented Mar 3, 2023

The latest version of the OpenAPI schema is named 2.2 so the filenames have been updated in the project to match.
Tweaked the README to add instructions for the jq dependency.

What led me down the path of updating the schema is that the error from /v1/inAppPurchaseSubmissions can't be decoded in RequestExecutor. The line self.errorResponse = try? APIProvider.jsonDecoder.decode(ErrorResponse.self, from: data) always results in nil. This was due to a detail field not being present in the ErrorResponse generated object. Unfortunately even the latest schema claims this field will always be present (it's really not), so for this PR I've manually removed it from the required elements in app_store_connect_api_2.2_openapi.json. Obviously this manual wrangling of the schema is not ideal but I imagine we'd rather have the error messages returned than not.

@Workshed Workshed requested a review from AvdLee as a code owner March 3, 2023 15:59
@MortenGregersen
Copy link
Contributor

Also, there are sometimes more information for the error in the property meta on the ErrorResponse schema: https://github.com/MortenGregersen/Bagbutik/blob/main/Sources/BagbutikSpecDecoder/Spec.swift#L188-L203

@Workshed
Copy link
Contributor Author

Workshed commented Mar 6, 2023

Also, there are sometimes more information for the error in the property meta on the ErrorResponse schema: https://github.com/MortenGregersen/Bagbutik/blob/main/Sources/BagbutikSpecDecoder/Spec.swift#L188-L203

There may well be, I've not found an ErrorResponse that includes a meta property for me to test with however.

Copy link
Owner

@AvdLee AvdLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, this is a very welcome change!

@SwiftLeeBot
Copy link
Collaborator

SwiftLeeBot commented Mar 7, 2023

Warnings
⚠️ 'InAppPurchases' is deprecated: Deprecated
⚠️ 'InAppPurchases' is deprecated: Deprecated
⚠️ 'PricePoints' is deprecated: Deprecated
⚠️ 'PricePoints' is deprecated: Deprecated
⚠️ 'AppPricePoint' is deprecated: Deprecated
⚠️ 'AppPricePoint' is deprecated: Deprecated
⚠️ 'AppPricePoint' is deprecated: Deprecated
⚠️ 'AppPricePoint' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'PricePoints' is deprecated: Deprecated
⚠️ 'AppPricePoint' is deprecated: Deprecated
⚠️ 'AppPricePoint' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'InAppPurchases' is deprecated: Deprecated
⚠️

Consider to place some MARK: lines for Sources/OpenAPI/Generated/Entities/AppEncryptionDeclaration.swift, which is over 300 lines big.

⚠️

Consider to place some MARK: lines for Sources/OpenAPI/Generated/Paths/PathsV1CiBuildRunsWithIDBuilds.swift, which is over 300 lines big.

⚠️

Consider to place some MARK: lines for Sources/OpenAPI/Generated/Paths/PathsV1AppsWithID.swift, which is over 300 lines big.

⚠️

Consider to place some MARK: lines for Sources/OpenAPI/Generated/Paths/PathsV1Apps.swift, which is over 300 lines big.

⚠️

Consider to place some MARK: lines for Sources/OpenAPI/Generated/Paths/PathsV1CiProductsWithIDApp.swift, which is over 300 lines big.

⚠️

Consider to place some MARK: lines for Sources/OpenAPI/Generated/Entities/AppInfo.swift, which is over 300 lines big.

⚠️

Consider to place some MARK: lines for Sources/OpenAPI/Generated/Paths/PathsV1Builds.swift, which is over 300 lines big.

Messages
📖 AppStoreConnect-Swift-SDK-Tests: Executed 11 tests (0 failed, 0 retried, 0 skipped) in 0.110 seconds
📖

View more details on Bitrise

Code Coverage Report

Name Coverage

SwiftLint found issues

Severity File Reason
Warning Package.swift:32 Line should be 140 characters or less: currently 154 characters (line_length)

Generated by 🚫 Danger Swift against 9316abe

@AvdLee
Copy link
Owner

AvdLee commented Mar 9, 2023

@Workshed could you have a look at the tests? 🙏

@Workshed
Copy link
Contributor Author

Workshed commented Mar 9, 2023

@AvdLee I've added a fix for the failing test. Is Bitrise triggered manually by yourself?

@AvdLee
Copy link
Owner

AvdLee commented Mar 10, 2023

Bitrise requires manual approval:
CleanShot 2023-03-10 at 14 22 58@2x

Quite annoying! But, it's running now! 🙏

@Workshed
Copy link
Contributor Author

Hilariously API 2.3 was released last night

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.

4 participants