From b74d54cfb827eb56977c5ef5730d6e8423d2b285 Mon Sep 17 00:00:00 2001 From: Enrico Zimuel Date: Thu, 4 Jan 2024 13:13:26 +0100 Subject: [PATCH] Improved the body BC break description in request/response for 8.x documentation (#2117) * Improved the body bc break in 8.x documentation * Removed just in the sentence (cherry picked from commit 6eabf37097c5dc32a618e47fdc0c968377ced314) --- docs/changelog.asciidoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/changelog.asciidoc b/docs/changelog.asciidoc index 0d79214b2..1b7e68c5a 100644 --- a/docs/changelog.asciidoc +++ b/docs/changelog.asciidoc @@ -361,6 +361,9 @@ The client API leaks HTTP-related notions in many places, and removing them woul This could be a rather big breaking change, so a double solution could be used during the 8.x lifecycle. (accepting body keys without them being wrapped in the body as well as the current solution). +To convert code from 7.x, you need to remove the `body` parameter in all the endpoints request. +For instance, this is an example for the `search` endpoint: + [source,js] ---- // from @@ -399,6 +402,12 @@ If you weren't extending the internals of the client, this won't be a breaking c The client API leaks HTTP-related notions in many places, and removing them would definitely improve the DX. The client will expose a new request-specific option to still get the full response details. +The new behaviour returns the `body` value directly as response. +If you want to have the 7.x response format, you need to add `meta : true` in the request. +This will return all the HTTP meta information, including the `body`. + +For instance, this is an example for the `search` endpoint: + [source,js] ---- // from