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

Improved the body BC break description in request/response for 8.x documentation #2117

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Changes from 1 commit
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
9 changes: 9 additions & 0 deletions docs/changelog.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 just need to remove the `body` parameter in all the endpoints request.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please eliminate the word just? https://developers.google.com/style/word-list#just

For instance, this is an example for the `search` endpoint:

[source,js]
----
// from
Expand Down Expand Up @@ -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
Expand Down