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

Conforming Response to Codable #230

Merged
merged 4 commits into from
May 1, 2023

Conversation

marcelmendesfilho
Copy link
Contributor

This very small PR conforms Response object to Codable so it can be used as a generic object.

@SwiftLeeBot
Copy link
Collaborator

SwiftLeeBot commented Apr 14, 2023

Warnings
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'InAppPurchases' is deprecated: Deprecated
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'InAppPurchases' is deprecated: Deprecated
⚠️ 'AppPrice' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'AppPrice' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'AppPrice' is deprecated: Deprecated
⚠️ 'AppPrice' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'InAppPurchases' is deprecated: Deprecated
Messages
📖 AppStoreConnect-Swift-SDK-Tests: Executed 16 tests (0 failed, 0 retried, 0 skipped) in 0.254 seconds
📖

View more details on Bitrise

Code Coverage Report

Name Coverage

SwiftLint found issues

Severity File Reason
Warning RequestExecutor.swift:14 Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)
Warning RateLimit.swift:13 Lines should not have trailing whitespace (trailing_whitespace)
Warning RateLimit.swift:16 Lines should not have trailing whitespace (trailing_whitespace)
Warning RateLimit.swift:19 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProviderTests.swift:13 Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)
Warning APIProviderTests.swift:43 Method 'setUp()' should call to super function (overridden_super_call)
Warning APIProviderTests.swift:9 Imports should be sorted (sorted_imports)

Generated by 🚫 Danger Swift against 2f422bf

@AvdLee
Copy link
Owner

AvdLee commented Apr 17, 2023

@marcelmendesfilho, thanks for your contribution! Can you elaborate on why you need this change? Btw, the tests are currently failing.

@marcelmendesfilho
Copy link
Contributor Author

hi @AvdLee thanks for asking! The use case is this: I want to create a generic fetcher that accepts any AppStoreConnect request. As an example, see the method signature below:

func fetcher<Response: Codable>(request: Request<Response>, maxRetries: Int? = 3) async throws -> Response

Conforming Response to Coddle allows me to have this generic fetcher and I've thought that it would be a nice addition to the package.

@AvdLee
Copy link
Owner

AvdLee commented Apr 25, 2023

@marcelmendesfilho sounds good, but let's make sure the tests are green!

@marcelmendesfilho
Copy link
Contributor Author

I'm working on it.

@marcelmendesfilho
Copy link
Contributor Author

@AvdLee looks like we're ready to go with this PR ;-)

@AvdLee
Copy link
Owner

AvdLee commented May 1, 2023

Yes, thanks for fixing the test and your contribution!

@AvdLee AvdLee merged commit df11b1c into AvdLee:master May 1, 2023
1 check passed
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