Skip to content

Commit 2df4d59

Browse files
github-actions[bot]lcawlpquentin
authored
[Backport 8.19] Fix inference examples (#4571)
* Fix inference examples (#4566) (cherry picked from commit 4a9925b) * Run make contrib --------- Co-authored-by: Lisa Cawley <[email protected]> Co-authored-by: Quentin Pradet <[email protected]>
1 parent 3f91106 commit 2df4d59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/add-new-api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,13 @@ Add an `examples` folder and `request` and `xxx_response` subfolders (where `xxx
173173

174174
These examples are for use in the API documentation and must adhere to the [OpenAPI 3.0 Example object specification](https://spec.openapis.org/oas/v3.0.3#example-object). They must have a `value` field that contains the request or response body.
175175
If there are multiple examples for the endpoint, they must each have a brief `summary` field, which is used as the label for the example. You can also optionaly provide an explanation in a `description` field.
176+
In order to generate curl and console examples automatically, the request examples must also contain a `method_request`.
176177

177178
For example:
178179

179180
```yaml
180181
summary: Sequence query
181-
# method_request: GET /my-data-stream/_eql/search
182+
method_request: GET /my-data-stream/_eql/search
182183
# type: request
183184
description: >
184185
Run `GET /my-data-stream/_eql/search` to search for a sequence of events.

0 commit comments

Comments
 (0)