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

appStoreVersionLocalizations endpoint returns the wrong data type #260

Closed josessolmaximo closed 5 months ago

josessolmaximo commented 8 months ago

Code

let request = APIEndpoint
                .v1
                .appStoreVersions
                .id(id)
                .appStoreVersionLocalizations
                .get(fieldsAppStoreVersionLocalizations: [
                    .description,
                    .whatsNew,
                    .promotionalText,
                    .keywords,
                    .supportURL,
                    .marketingURL,
                    .appStoreVersion
                ])

let data = try await provider.request(request).data

Expected Result Returns [AppStoreVersionLocalization]

Actual Result Returns [AppStoreVersion], causing a decoding error

Error

Error: dataCorrupted(Swift.DecodingError.Context(codingPath: [StringCodingKey(stringValue: "data", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), StringCodingKey(stringValue: "type", intValue: nil)], debugDescription: "Cannot initialize Type from invalid String value appStoreVersionLocalizations", underlyingError: nil)).
github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.

J0s34h commented 7 months ago

@AvdLee looks like there is issue with codegen, as this issue is across multiple endpoints (same here https://github.com/AvdLee/appstoreconnect-swift-sdk/pull/271)

github-actions[bot] commented 6 months ago

This issue is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.