Skip to content

[8.18] Fix example readme (#4566) #4579

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

Merged
merged 1 commit into from
Jun 17, 2025
Merged
Changes from all commits
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
3 changes: 2 additions & 1 deletion docs/add-new-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,13 @@ Add an `examples` folder and `request` and `xxx_response` subfolders (where `xxx

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.
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.
In order to generate curl and console examples automatically, the request examples must also contain a `method_request`.

For example:

```yaml
summary: Sequence query
# method_request: GET /my-data-stream/_eql/search
method_request: GET /my-data-stream/_eql/search
# type: request
description: >
Run `GET /my-data-stream/_eql/search` to search for a sequence of events.
Expand Down