Skip to content

Commit c898247

Browse files
algolia-botmillotp
andcommitted
fix(specs): getObject return object (generated)
algolia/api-clients-automation#3446 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 1a91bdb commit c898247

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/Search/SearchClient.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,15 +1726,15 @@ open class SearchClient {
17261726
/// to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is
17271727
/// always retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is
17281728
/// authenticated with the admin API key. (optional)
1729-
/// - returns: [String: String]
1729+
/// - returns: AnyCodable
17301730
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
17311731
open func getObject(
17321732
indexName: String,
17331733
objectID: String,
17341734
attributesToRetrieve: [String]? = nil,
17351735
requestOptions: RequestOptions? = nil
1736-
) async throws -> [String: String] {
1737-
let response: Response<[String: String]> = try await getObjectWithHTTPInfo(
1736+
) async throws -> AnyCodable {
1737+
let response: Response<AnyCodable> = try await getObjectWithHTTPInfo(
17381738
indexName: indexName,
17391739
objectID: objectID,
17401740
attributesToRetrieve: attributesToRetrieve,
@@ -1762,14 +1762,14 @@ open class SearchClient {
17621762
// always
17631763
// retrieved. Attributes included in `unretrievableAttributes` won't be retrieved unless the request is
17641764
// authenticated with the admin API key. (optional)
1765-
// - returns: RequestBuilder<[String: String]>
1765+
// - returns: RequestBuilder<AnyCodable>
17661766

17671767
open func getObjectWithHTTPInfo(
17681768
indexName: String,
17691769
objectID: String,
17701770
attributesToRetrieve: [String]? = nil,
17711771
requestOptions userRequestOptions: RequestOptions? = nil
1772-
) async throws -> Response<[String: String]> {
1772+
) async throws -> Response<AnyCodable> {
17731773
guard !indexName.isEmpty else {
17741774
throw AlgoliaError.invalidArgument("indexName", "getObject")
17751775
}

0 commit comments

Comments
 (0)