Skip to content

Commit 56f6288

Browse files
committed
Adjustment to formatting
1 parent ce28b82 commit 56f6288

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

docs/release-notes/breaking-changes.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,18 @@ Breaking changes can impact your Elastic applications, potentially disrupting no
1717

1818
## 9.0.0 [elasticsearch-javascript-client-900-breaking-changes]
1919

20-
::::{dropdown} Improvements to the optional `body` property
20+
::::{dropdown} Changes to the optional body property
2121

2222
In 8.x, every API function had a `body` property that would provide a place to put arbitrary values that should go in the HTTP request body, even if they were not noted in the specification or documentation. In 9.0, each API function still includes an optional `body` property, but TypeScript's type checker will disallow properties that should go in the root of the object. A `querystring` parameter has also been added that behaves the same as `body`, but inserts its values into the request querystring.
2323

24-
Also, the logic for where each parameter should be added to an API HTTP request has been updated:
24+
**Impact**<br> Some adjustments to API calls may be necessary for code that used a `body` property 8.x, especially to appease the TypeScript type checker, but it should not have any impact on any code that was not using a `body` property.
25+
26+
**Action**<br> Check existing code for use of the `body` property, and move any properties that should be in the root object according to the API function's request type definition. If using TypeScript, the TypeScript type checker will surface most of these issues for you.
27+
::::
28+
29+
::::{dropdown} Changes to API parameter collation into an HTTP request
30+
31+
The logic for where each parameter in an API function call should be added to its HTTP request has been updated:
2532

2633
1. If recognized as a `body` parameter according to the Elasticsearch specification, put it in the JSON body
2734
2. If recognized as a `path` parameter, put it in the URL path
@@ -31,9 +38,9 @@ Also, the logic for where each parameter should be added to an API HTTP request
3138

3239
The first two steps are identical in 8.x. The final three steps replace the logic from 8.x that put all unrecognized parameters in the querystring.
3340

34-
**Impact**<br> Some adjustments to API calls may be necessary for code that used a `body` property 8.x, especially to appease the TypeScript type checker, but it should not have any impact on any code that was not using a `body` property.
41+
**Impact**<br> Some parameters that were sent via querystring to Elasticsearch may be sent in the JSON request body, and vice versa.
3542

36-
**Action**<br> Check existing code for use of the `body` property, and move any properties that should be in the root object according to the API function's request type definition. If using TypeScript, the TypeScript type checker will surface most of these issues for you.
43+
**Action**<br> If Elasticsearch sends back an error response due to a request not being valid, verify with the client's TypeScript type definitions, or via the docs, that the parameters your code passes are correct.
3744
::::
3845

3946
::::{dropdown} Removal of the default 30-second timeout on all API calls

0 commit comments

Comments
 (0)