Skip to content

Commit 012675a

Browse files
authored
Merge branch 'main' into mw-stored-example-link
2 parents 84d3f22 + 4a9925b commit 012675a

File tree

9 files changed

+362
-50
lines changed

9 files changed

+362
-50
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.

output/openapi/elasticsearch-openapi.json

Lines changed: 16 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 16 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 104 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/esql/_types/EsqlResult.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import { FieldValue, Id, IndexName, NodeId } from '@_types/common'
20+
import { FieldValue, IndexName, NodeId } from '@_types/common'
2121
import { ErrorCause } from '@_types/Errors'
2222
import { integer } from '@_types/Numeric'
2323
import { DurationValue, UnitMillis } from '@_types/Time'
@@ -67,6 +67,7 @@ export class EsqlClusterDetails {
6767
indices: string
6868
took?: DurationValue<UnitMillis>
6969
_shards?: EsqlShardInfo
70+
failures?: EsqlShardFailure[]
7071
}
7172

7273
export enum EsqlClusterStatus {
@@ -82,12 +83,11 @@ export class EsqlShardInfo {
8283
successful?: integer
8384
skipped?: integer
8485
failed?: integer
85-
failures?: EsqlShardFailure[]
8686
}
8787

8888
export class EsqlShardFailure {
89-
shard: Id
90-
index: IndexName
89+
shard: integer
90+
index: IndexName | null
9191
node?: NodeId
9292
reason: ErrorCause
9393
}

0 commit comments

Comments
 (0)