From 6c13ee936154e1fe1ee81d6e913abeaf6a985394 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Thu, 10 Oct 2024 00:10:17 +0000 Subject: [PATCH] fix(specs): use the read transporter for browse (#3938) (generated) [skip ci] Co-authored-by: Pierre Millot --- .../algoliasearch/Clients/SearchClient.cs | 1 + .../packages/client_search/lib/src/api/search_client.dart | 1 + clients/algoliasearch-client-go/algolia/search/api_search.go | 2 +- .../src/main/java/com/algolia/api/SearchClient.java | 1 + .../packages/client-search/src/searchClient.ts | 1 + .../commonMain/kotlin/com/algolia/client/api/SearchClient.kt | 1 + clients/algoliasearch-client-php/lib/Api/SearchClient.php | 2 +- .../algoliasearch/search/client.py | 4 ++-- .../lib/algolia/api/search_client.rb | 2 +- .../src/main/scala/algoliasearch/api/SearchClient.scala | 1 + .../Sources/Search/SearchClient.swift | 3 ++- specs/bundled/search.doc.yml | 1 + specs/bundled/search.yml | 1 + 13 files changed, 15 insertions(+), 6 deletions(-) diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchClient.cs b/clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchClient.cs index fc393373d5..741961bf75 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchClient.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchClient.cs @@ -2199,6 +2199,7 @@ public async Task> BrowseAsync(string indexName, BrowsePara requestOptions.PathParameters.Add("indexName", QueryStringHelper.ParameterToString(indexName)); requestOptions.Data = browseParams; + requestOptions.UseReadTransporter = true; return await _transport.ExecuteRequestAsync>(new HttpMethod("POST"), "/1/indexes/{indexName}/browse", requestOptions, cancellationToken).ConfigureAwait(false); } diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/api/search_client.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/api/search_client.dart index a342788f64..b283e99c25 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/api/search_client.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/api/search_client.dart @@ -374,6 +374,7 @@ final class SearchClient implements ApiClient { method: RequestMethod.post, path: r'/1/indexes/{indexName}/browse'.replaceAll( '{' r'indexName' '}', Uri.encodeComponent(indexName.toString())), + isRead: true, body: browseParams?.toJson(), ); final response = await _retryStrategy.execute( diff --git a/clients/algoliasearch-client-go/algolia/search/api_search.go b/clients/algoliasearch-client-go/algolia/search/api_search.go index 5596e6819d..28d9a4c9b7 100644 --- a/clients/algoliasearch-client-go/algolia/search/api_search.go +++ b/clients/algoliasearch-client-go/algolia/search/api_search.go @@ -1411,7 +1411,7 @@ func (c *APIClient) BrowseWithHTTPInfo(r ApiBrowseRequest, opts ...RequestOption return nil, nil, err } - return c.callAPI(req, false) + return c.callAPI(req, true) } /* diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/SearchClient.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/SearchClient.java index e93a49a099..f426719810 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/SearchClient.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/SearchClient.java @@ -678,6 +678,7 @@ public CompletableFuture> browseAsync( .setPath("/1/indexes/{indexName}/browse", indexName) .setMethod("POST") .setBody(browseParams) + .setRead(true) .build(); return executeAsync(request, requestOptions, BrowseResponse.class, innerType); } diff --git a/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts b/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts index aed0600a0b..b5ded289be 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts @@ -1029,6 +1029,7 @@ export function createSearchClient({ queryParameters, headers, data: browseParams ? browseParams : {}, + useReadTransporter: true, }; return transporter.request(request, requestOptions); diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/SearchClient.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/SearchClient.kt index ce1a3ac086..7810bff3b5 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/SearchClient.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/SearchClient.kt @@ -200,6 +200,7 @@ public class SearchClient( val requestConfig = RequestConfig( method = RequestMethod.POST, path = listOf("1", "indexes", "$indexName", "browse"), + isRead = true, body = browseParams, ) return requester.execute( diff --git a/clients/algoliasearch-client-php/lib/Api/SearchClient.php b/clients/algoliasearch-client-php/lib/Api/SearchClient.php index 889c382f0c..e866ed4694 100644 --- a/clients/algoliasearch-client-php/lib/Api/SearchClient.php +++ b/clients/algoliasearch-client-php/lib/Api/SearchClient.php @@ -484,7 +484,7 @@ public function browse($indexName, $browseParams = null, $requestOptions = []) ); } - return $this->sendRequest('POST', $resourcePath, $headers, $queryParameters, $httpBody, $requestOptions); + return $this->sendRequest('POST', $resourcePath, $headers, $queryParameters, $httpBody, $requestOptions, true); } /** diff --git a/clients/algoliasearch-client-python/algoliasearch/search/client.py b/clients/algoliasearch-client-python/algoliasearch/search/client.py index aa210ee7c0..df88f5380a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/client.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/client.py @@ -1227,7 +1227,7 @@ async def browse_with_http_info( data=dumps(body_serializer(_data)), user_request_options=request_options, ), - use_read_transporter=False, + use_read_transporter=True, ) async def browse( @@ -6228,7 +6228,7 @@ def browse_with_http_info( data=dumps(body_serializer(_data)), user_request_options=request_options, ), - use_read_transporter=False, + use_read_transporter=True, ) def browse( diff --git a/clients/algoliasearch-client-ruby/lib/algolia/api/search_client.rb b/clients/algoliasearch-client-ruby/lib/algolia/api/search_client.rb index e97398c3c0..c3ccfe9522 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/api/search_client.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/api/search_client.rb @@ -431,7 +431,7 @@ def browse_with_http_info(index_name, browse_params = nil, request_options = {}) :header_params => header_params, :query_params => query_params, :body => post_body, - :use_read_transporter => false + :use_read_transporter => true ) @api_client.call_api(:POST, path, new_options) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/SearchClient.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/SearchClient.scala index 3bb57348e6..5f839967bb 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/SearchClient.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/SearchClient.scala @@ -335,6 +335,7 @@ class SearchClient( .withMethod("POST") .withPath(s"/1/indexes/${escape(indexName)}/browse") .withBody(browseParams) + .withRead(true) .build() execute[BrowseResponse](request, requestOptions) } diff --git a/clients/algoliasearch-client-swift/Sources/Search/SearchClient.swift b/clients/algoliasearch-client-swift/Sources/Search/SearchClient.swift index 4bca4e9bec..37a88edda8 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/SearchClient.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/SearchClient.swift @@ -515,7 +515,8 @@ open class SearchClient { method: "POST", path: resourcePath, data: body ?? AnyCodable(), - requestOptions: RequestOptions(headers: headers, queryParameters: queryParameters) + userRequestOptions + requestOptions: RequestOptions(headers: headers, queryParameters: queryParameters) + userRequestOptions, + useReadTransporter: true ) } diff --git a/specs/bundled/search.doc.yml b/specs/bundled/search.doc.yml index d59e284328..305430fe06 100644 --- a/specs/bundled/search.doc.yml +++ b/specs/bundled/search.doc.yml @@ -2177,6 +2177,7 @@ paths: tags: - Search operationId: browse + x-use-read-transporter: true x-acl: - browse summary: Browse for records diff --git a/specs/bundled/search.yml b/specs/bundled/search.yml index 2aae8a6740..339648f7a5 100644 --- a/specs/bundled/search.yml +++ b/specs/bundled/search.yml @@ -551,6 +551,7 @@ paths: tags: - search operationId: browse + x-use-read-transporter: true x-acl: - browse summary: Browse for records