@@ -2038,11 +2038,18 @@ open class SearchClient {
2038
2038
}
2039
2039
2040
2040
/// - parameter indexName: (path) Name of the index on which to perform the operation.
2041
+ /// - parameter getVersion: (query) When set to 2, the endpoint will not include `synonyms` in the response. This
2042
+ /// parameter is here for backward compatibility. (optional, default to 1)
2041
2043
/// - returns: SettingsResponse
2042
2044
@available ( macOS 10 . 15 , iOS 13 . 0 , tvOS 13 . 0 , watchOS 6 . 0 , * )
2043
- open func getSettings( indexName: String , requestOptions: RequestOptions ? = nil ) async throws -> SettingsResponse {
2045
+ open func getSettings(
2046
+ indexName: String ,
2047
+ getVersion: Int ? = nil ,
2048
+ requestOptions: RequestOptions ? = nil
2049
+ ) async throws -> SettingsResponse {
2044
2050
let response : Response < SettingsResponse > = try await getSettingsWithHTTPInfo (
2045
2051
indexName: indexName,
2052
+ getVersion: getVersion,
2046
2053
requestOptions: requestOptions
2047
2054
)
2048
2055
@@ -2058,10 +2065,14 @@ open class SearchClient {
2058
2065
// - settings
2059
2066
//
2060
2067
// - parameter indexName: (path) Name of the index on which to perform the operation.
2068
+ //
2069
+ // - parameter getVersion: (query) When set to 2, the endpoint will not include `synonyms` in the response. This
2070
+ // parameter is here for backward compatibility. (optional, default to 1)
2061
2071
// - returns: RequestBuilder<SettingsResponse>
2062
2072
2063
2073
open func getSettingsWithHTTPInfo(
2064
2074
indexName: String ,
2075
+ getVersion: Int ? = nil ,
2065
2076
requestOptions userRequestOptions: RequestOptions ? = nil
2066
2077
) async throws -> Response < SettingsResponse > {
2067
2078
guard !indexName. isEmpty else {
@@ -2079,7 +2090,9 @@ open class SearchClient {
2079
2090
range: nil
2080
2091
)
2081
2092
let body : AnyCodable ? = nil
2082
- let queryParameters : [ String : Any ? ] ? = nil
2093
+ let queryParameters : [ String : Any ? ] = [
2094
+ " getVersion " : getVersion? . encodeToJSON ( ) ,
2095
+ ]
2083
2096
2084
2097
let nillableHeaders : [ String : Any ? ] ? = nil
2085
2098
0 commit comments