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

Use Decodable where enough for search #874

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Sources/Search/SearchClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ open class SearchClient {
/// - parameter browseParams: (body) (optional)
/// - returns: BrowseResponse
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open func browse<T: Codable>(
open func browse<T: Decodable>(
indexName: String,
browseParams: BrowseParams? = nil,
requestOptions: RequestOptions? = nil
Expand Down Expand Up @@ -486,7 +486,7 @@ open class SearchClient {
// - parameter browseParams: (body) (optional)
// - returns: RequestBuilder<BrowseResponse>

open func browseWithHTTPInfo<T: Codable>(
open func browseWithHTTPInfo<T: Decodable>(
indexName: String,
browseParams: BrowseParams? = nil,
requestOptions userRequestOptions: RequestOptions? = nil
Expand Down Expand Up @@ -1826,7 +1826,7 @@ open class SearchClient {
/// - parameter getObjectsParams: (body) Request object.
/// - returns: GetObjectsResponse
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open func getObjects<T: Codable>(
open func getObjects<T: Decodable>(
getObjectsParams: GetObjectsParams,
requestOptions: RequestOptions? = nil
) async throws -> GetObjectsResponse<T> {
Expand All @@ -1850,7 +1850,7 @@ open class SearchClient {
// - parameter getObjectsParams: (body) Request object.
// - returns: RequestBuilder<GetObjectsResponse>

open func getObjectsWithHTTPInfo<T: Codable>(
open func getObjectsWithHTTPInfo<T: Decodable>(
getObjectsParams: GetObjectsParams,
requestOptions userRequestOptions: RequestOptions? = nil
) async throws -> Response<GetObjectsResponse<T>> {
Expand Down Expand Up @@ -3351,7 +3351,7 @@ open class SearchClient {
/// requests.
/// - returns: SearchResponses
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open func search<T: Codable>(
open func search<T: Decodable>(
searchMethodParams: SearchMethodParams,
requestOptions: RequestOptions? = nil
) async throws -> SearchResponses<T> {
Expand All @@ -3378,7 +3378,7 @@ open class SearchClient {
// requests.
// - returns: RequestBuilder<SearchResponses>

open func searchWithHTTPInfo<T: Codable>(
open func searchWithHTTPInfo<T: Decodable>(
searchMethodParams: SearchMethodParams,
requestOptions userRequestOptions: RequestOptions? = nil
) async throws -> Response<SearchResponses<T>> {
Expand Down Expand Up @@ -3620,7 +3620,7 @@ open class SearchClient {
/// - parameter searchParams: (body) (optional)
/// - returns: SearchResponse
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open func searchSingleIndex<T: Codable>(
open func searchSingleIndex<T: Decodable>(
indexName: String,
searchParams: SearchSearchParams? = nil,
requestOptions: RequestOptions? = nil
Expand Down Expand Up @@ -3649,7 +3649,7 @@ open class SearchClient {
// - parameter searchParams: (body) (optional)
// - returns: RequestBuilder<SearchResponse>

open func searchSingleIndexWithHTTPInfo<T: Codable>(
open func searchSingleIndexWithHTTPInfo<T: Decodable>(
indexName: String,
searchParams: SearchSearchParams? = nil,
requestOptions userRequestOptions: RequestOptions? = nil
Expand Down