Skip to content

Commit 889d585

Browse files
committed
Extract search_template request body, propagate to watcher
1 parent 23f36d9 commit 889d585

File tree

4 files changed

+109
-6
lines changed

4 files changed

+109
-6
lines changed

output/schema/schema.json

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

output/schema/validation-errors.json

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

output/typescript/types.ts

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

specification/watcher/_types/Input.ts

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

20-
import { Request as SearchTemplateRequest } from '@global/search_template/SearchTemplateRequest'
2120
import { Dictionary } from '@spec_utils/Dictionary'
2221
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
2322
import {
24-
ExpandWildcards,
23+
ExpandWildcards, Id,
2524
IndexName,
2625
IndicesOptions,
2726
Password,
@@ -122,10 +121,31 @@ export class SearchInputRequestDefinition {
122121
indices?: IndexName[]
123122
indices_options?: IndicesOptions
124123
search_type?: SearchType
125-
template?: SearchTemplateRequest
124+
template?: SearchTemplateRequestBody
126125
rest_total_hits_as_int?: boolean
127126
}
128127

128+
// Should be kept in sync with _global/search_template/SearchTemplateRequest.body
129+
export class SearchTemplateRequestBody {
130+
/** @server_default false */
131+
explain?: boolean
132+
/**
133+
* ID of the search template to use. If no source is specified,
134+
* this parameter is required.
135+
*/
136+
id?: Id
137+
params?: Dictionary<string, UserDefinedValue>
138+
/** @server_default false */
139+
profile?: boolean
140+
/**
141+
* An inline search template. Supports the same parameters as the search API's
142+
* request body. Also supports Mustache variables. If no id is specified, this
143+
* parameter is required.
144+
*/
145+
source?: string
146+
}
147+
148+
129149
export class SearchInputRequestBody {
130150
query: QueryContainer
131151
}

0 commit comments

Comments
 (0)