Skip to content

Commit

Permalink
fix(specs): use the read transporter for browse (#3938) (generated) […
Browse files Browse the repository at this point in the history
…skip ci]

Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
algolia-bot committed Oct 10, 2024
1 parent 434c99f commit 6c13ee9
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2199,6 +2199,7 @@ public async Task<BrowseResponse<T>> BrowseAsync<T>(string indexName, BrowsePara
requestOptions.PathParameters.Add("indexName", QueryStringHelper.ParameterToString(indexName));

requestOptions.Data = browseParams;
requestOptions.UseReadTransporter = true;
return await _transport.ExecuteRequestAsync<BrowseResponse<T>>(new HttpMethod("POST"), "/1/indexes/{indexName}/browse", requestOptions, cancellationToken).ConfigureAwait(false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ public <T> CompletableFuture<BrowseResponse<T>> browseAsync(
.setPath("/1/indexes/{indexName}/browse", indexName)
.setMethod("POST")
.setBody(browseParams)
.setRead(true)
.build();
return executeAsync(request, requestOptions, BrowseResponse.class, innerType);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@ export function createSearchClient({
queryParameters,
headers,
data: browseParams ? browseParams : {},
useReadTransporter: true,
};

return transporter.request(request, requestOptions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion clients/algoliasearch-client-php/lib/Api/SearchClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ class SearchClient(
.withMethod("POST")
.withPath(s"/1/indexes/${escape(indexName)}/browse")
.withBody(browseParams)
.withRead(true)
.build()
execute[BrowseResponse](request, requestOptions)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}

Expand Down
1 change: 1 addition & 0 deletions specs/bundled/search.doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2177,6 +2177,7 @@ paths:
tags:
- Search
operationId: browse
x-use-read-transporter: true
x-acl:
- browse
summary: Browse for records
Expand Down
1 change: 1 addition & 0 deletions specs/bundled/search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ paths:
tags:
- search
operationId: browse
x-use-read-transporter: true
x-acl:
- browse
summary: Browse for records
Expand Down

0 comments on commit 6c13ee9

Please sign in to comment.