Skip to content

Commit 398c37c

Browse files
committed
Fix formatting
1 parent 4d935d0 commit 398c37c

File tree

6 files changed

+97
-91
lines changed

6 files changed

+97
-91
lines changed

output/openapi/elasticsearch-openapi.json

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

+17-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/simulate/ingest/SimulateIngestRequest.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { Pipeline } from '@ingest/_types/Pipeline'
2323
import { Document } from '@ingest/_types/Simulation'
2424
import { Dictionary } from '@spec_utils/Dictionary'
2525
import { RequestBase } from '@_types/Base'
26-
import { IndexName } from '@_types/common'
26+
import { IndexName, PipelineName } from '@_types/common'
2727
import { TypeMapping } from '@_types/mapping/TypeMapping'
2828

2929
/**
@@ -64,17 +64,17 @@ export interface Request extends RequestBase {
6464
* The pipeline to use as the default pipeline.
6565
* This value can be used to override the default pipeline of the index.
6666
*/
67-
pipeline?: string
67+
pipeline?: PipelineName
6868
}
6969
body: {
70-
/**
71-
* A map of component template names to substitute component template definition objects.
72-
*/
73-
component_template_substitutions?: Dictionary<string, ComponentTemplateNode>
7470
/**
7571
* Sample documents to test in the pipeline.
7672
*/
7773
docs: Document[]
74+
/**
75+
* A map of component template names to substitute component template definition objects.
76+
*/
77+
component_template_substitutions?: Dictionary<string, ComponentTemplateNode>
7878
/**
7979
* A map of index template names to substitute index template definition objects.
8080
*/

specification/simulate/ingest/examples/request/SimulateIngestRequestExample3.yaml

+39-34
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,44 @@
11
summary: Component template substitutions
22
# method_request: POST /_ingest/_simulate
3-
description: In this example, imagine that the index `my-index` has a strict mapping with only the `foo` keyword field defined. Say that field mapping came from a component template named `my-mappings-template`. We want to test adding a new field, `bar`. So a substitute definition of `my-mappings-template` is provided in `component_template_substitutions`. The substitute `my-mappings-template` will be used in place of the existing mapping for `my-index` and in place of the `my-mappings-template` that is in the system.
3+
description: >
4+
In this example, imagine that the index `my-index` has a strict mapping with only the `foo` keyword field defined.
5+
Say that field mapping came from a component template named `my-mappings-template`. You want to test adding a new field, `bar`.
6+
So a substitute definition of `my-mappings-template` is provided in `component_template_substitutions`.
7+
The substitute `my-mappings-template` will be used in place of the existing mapping for `my-index` and in place of the `my-mappings-template` that is in the system.
48
# type: request
5-
value: '{
6-
"docs": [
9+
value: |-
710
{
8-
"_index": "my-index",
9-
"_id": "123",
10-
"_source": {
11-
"foo": "foo"
11+
"docs": [
12+
{
13+
"_index": "my-index",
14+
"_id": "123",
15+
"_source": {
16+
"foo": "foo"
17+
}
18+
},
19+
{
20+
"_index": "my-index",
21+
"_id": "456",
22+
"_source": {
23+
"bar": "rab"
24+
}
25+
}
26+
],
27+
"component_template_substitutions": {
28+
"my-mappings_template": {
29+
"template": {
30+
"mappings": {
31+
"dynamic": "strict",
32+
"properties": {
33+
"foo": {
34+
"type": "keyword"
35+
},
36+
"bar": {
37+
"type": "keyword"
38+
}
39+
}
40+
}
41+
}
42+
}
43+
}
1244
}
13-
},
14-
{
15-
"_index": "my-index",
16-
"_id": "456",
17-
"_source": {
18-
"bar": "rab"
19-
}
20-
}
21-
],
22-
"component_template_substitutions": {
23-
"my-mappings_template": {
24-
"template": {
25-
"mappings": {
26-
"dynamic": "strict",
27-
"properties": {
28-
"foo": {
29-
"type": "keyword"
30-
},
31-
"bar": {
32-
"type": "keyword"
33-
}
34-
}
35-
}
36-
}
37-
}
38-
}
39-
}'

specification/simulate/ingest/examples/response/SimulateIngestResponseExample3.yaml

+25-24
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,30 @@ summary: Use pipeline substitutions
22
description: A successful response when the simulation uses pipeline substitutions.
33
# type: response
44
# response_code: 200
5-
value: '{
6-
"docs": [
5+
value: |-
76
{
8-
"doc": {
9-
"_id": "123",
10-
"_index": "my-index",
11-
"_version": -3,
12-
"_source": {
13-
"foo": "foo"
14-
},
15-
"executed_pipelines": []
7+
"docs": [
8+
{
9+
"doc": {
10+
"_id": "123",
11+
"_index": "my-index",
12+
"_version": -3,
13+
"_source": {
14+
"foo": "foo"
15+
},
16+
"executed_pipelines": []
17+
}
18+
},
19+
{
20+
"doc": {
21+
"_id": "456",
22+
"_index": "my-index",
23+
"_version": -3,
24+
"_source": {
25+
"bar": "rab"
26+
},
27+
"executed_pipelines": []
28+
}
29+
}
30+
]
1631
}
17-
},
18-
{
19-
"doc": {
20-
"_id": "456",
21-
"_index": "my-index",
22-
"_version": -3,
23-
"_source": {
24-
"bar": "rab"
25-
},
26-
"executed_pipelines": []
27-
}
28-
}
29-
]
30-
}'

0 commit comments

Comments
 (0)