Skip to content

Commit d3f17c3

Browse files
authored
Spec cleanup (elastic#692)
1 parent 0982a26 commit d3f17c3

File tree

306 files changed

+539
-539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+539
-539
lines changed

docs/add-new-api.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ Following you can find a template valid for any request definition.
6565
* @stability stable | beta | experimental
6666
*/
6767
interface Request extends RequestBase {
68-
path_parts?: {
68+
path_parts: {
6969

7070
};
71-
query_parameters?: {
71+
query_parameters: {
7272

7373
};
74-
body?: {
74+
body: {
7575

7676
};
7777
}
@@ -85,13 +85,13 @@ In some cases, the request could take one or more generics, in such case the def
8585
* @stability stable | beta | experimental
8686
*/
8787
interface Request<Generic> extends RequestBase {
88-
path_parts?: {
88+
path_parts: {
8989

9090
};
91-
query_parameters?: {
91+
query_parameters: {
9292

9393
};
94-
body?: {
94+
body: {
9595

9696
};
9797
}

docs/modeling-guide.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ export class ConfusionMatrixThreshold {
429429
}
430430

431431
export interface Request<TDocument> extends RequestBase {
432-
path_parts?: {}
433-
query_parameters?: {}
432+
path_parts: {}
433+
query_parameters: {}
434434
/** @identifier document */
435435
body?: TDocument
436436
}

docs/specification-structure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ import { RequestBase } from '@_types/Base'
6464
*/
6565
export interface Request extends RequestBase {
6666
path_parts: {}
67-
query_parameters?: {}
67+
query_parameters: {}
6868
}
6969
```
7070
```ts

docs/validation-example.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ open it with your favourite editor and perform the fix
5656
@rest_spec_name("index")
5757
@class_serializer("IndexRequestFormatter`1")
5858
class IndexRequest<TDocument> extends RequestBase {
59-
path_parts?: {
59+
path_parts: {
6060
- id?: string;
6161
+ id?: string | number;
6262
index: string;
6363
type?: string;
6464
}
65-
query_parameters?: {
65+
query_parameters: {
6666
if_primary_term?: long;
6767
if_seq_no?: long;
6868
op_type?: OpType;

specification/_global/bulk/BulkRequest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ import { OperationContainer } from './types'
3636
*
3737
*/
3838
export interface Request<TSource> extends RequestBase {
39-
path_parts?: {
39+
path_parts: {
4040
index?: IndexName
4141
type?: Type
4242
}
43-
query_parameters?: {
43+
query_parameters: {
4444
pipeline?: string
4545
refresh?: Refresh
4646
routing?: Routing

specification/_global/clear_scroll/ClearScrollRequest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ import { Ids } from '@_types/common'
2626
* @stability stable
2727
*/
2828
export interface Request extends RequestBase {
29-
path_parts?: {
29+
path_parts: {
3030
scroll_id?: Ids
3131
}
32-
body?: {
32+
body: {
3333
scroll_id?: Ids
3434
}
3535
}

specification/_global/close_point_in_time/ClosePointInTimeRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { Id } from '@_types/common'
2626
* @stability stable
2727
*/
2828
export interface Request extends RequestBase {
29-
body?: {
29+
body: {
3030
id: Id
3131
}
3232
}

specification/_global/count/CountRequest.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ import { QueryContainer } from '@_types/query_dsl/abstractions'
3333
* @stability stable
3434
*/
3535
export interface Request extends RequestBase {
36-
path_parts?: {
36+
path_parts: {
3737
index?: Indices
3838
}
39-
query_parameters?: {
39+
query_parameters: {
4040
allow_no_indices?: boolean
4141
analyzer?: string
4242
analyze_wildcard?: boolean
@@ -53,7 +53,7 @@ export interface Request extends RequestBase {
5353
terminate_after?: long
5454
q?: string
5555
}
56-
body?: {
56+
body: {
5757
query?: QueryContainer
5858
}
5959
}

specification/_global/create/CreateRequest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ import { Time } from '@_types/Time'
3737
*
3838
*/
3939
export interface Request<TDocument> extends RequestBase {
40-
path_parts?: {
40+
path_parts: {
4141
id: Id
4242
index: IndexName
4343
type?: Type
4444
}
45-
query_parameters?: {
45+
query_parameters: {
4646
pipeline?: string
4747
refresh?: Refresh
4848
routing?: Routing

specification/_global/delete/DeleteRequest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ import { Time } from '@_types/Time'
3838
* @stability stable
3939
*/
4040
export interface Request extends RequestBase {
41-
path_parts?: {
41+
path_parts: {
4242
id: Id
4343
index: IndexName
4444
type?: Type
4545
}
46-
query_parameters?: {
46+
query_parameters: {
4747
if_primary_term?: long
4848
if_seq_no?: SequenceNumber
4949
refresh?: Refresh

specification/_global/delete_by_query/DeleteByQueryRequest.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ import { Time } from '@_types/Time'
3939
* @stability stable
4040
*/
4141
export interface Request extends RequestBase {
42-
path_parts?: {
42+
path_parts: {
4343
index: Indices
4444
}
45-
query_parameters?: {
45+
query_parameters: {
4646
allow_no_indices?: boolean
4747
analyzer?: string
4848
analyze_wildcard?: boolean
@@ -77,7 +77,7 @@ export interface Request extends RequestBase {
7777
wait_for_active_shards?: WaitForActiveShards
7878
wait_for_completion?: boolean
7979
}
80-
body?: {
80+
body: {
8181
max_docs?: long
8282
query?: QueryContainer
8383
slice?: SlicedScroll

specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ import { long } from '@_types/Numeric'
2727
* @stability stable
2828
*/
2929
export interface Request extends RequestBase {
30-
path_parts?: {
30+
path_parts: {
3131
task_id: Id
3232
}
33-
query_parameters?: {
33+
query_parameters: {
3434
requests_per_second?: long
3535
}
3636
}

specification/_global/delete_script/DeleteScriptRequest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ import { Time } from '@_types/Time'
2727
* @stability stable
2828
*/
2929
export interface Request extends RequestBase {
30-
path_parts?: {
30+
path_parts: {
3131
id: Id
3232
}
33-
query_parameters?: {
33+
query_parameters: {
3434
master_timeout?: Time
3535
timeout?: Time
3636
}

specification/_global/exists/DocumentExistsRequest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ import {
3333
* @stability stable
3434
*/
3535
export interface Request extends RequestBase {
36-
path_parts?: {
36+
path_parts: {
3737
id: Id
3838
index: IndexName
3939
}
40-
query_parameters?: {
40+
query_parameters: {
4141
preference?: string
4242
realtime?: boolean
4343
refresh?: boolean

specification/_global/exists_source/SourceExistsRequest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ import {
3434
* @stability stable
3535
*/
3636
export interface Request extends RequestBase {
37-
path_parts?: {
37+
path_parts: {
3838
id: Id
3939
index: IndexName
4040
type?: Type
4141
}
42-
query_parameters?: {
42+
query_parameters: {
4343
preference?: string
4444
realtime?: boolean
4545
refresh?: boolean

specification/_global/explain/ExplainRequest.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ import { QueryContainer } from '@_types/query_dsl/abstractions'
2727
* @stability stable
2828
*/
2929
export interface Request extends RequestBase {
30-
path_parts?: {
30+
path_parts: {
3131
id: Id
3232
index: IndexName
3333
}
34-
query_parameters?: {
34+
query_parameters: {
3535
analyzer?: string
3636
analyze_wildcard?: boolean
3737
default_operator?: DefaultOperator
@@ -46,7 +46,7 @@ export interface Request extends RequestBase {
4646
stored_fields?: Fields
4747
q?: string
4848
}
49-
body?: {
49+
body: {
5050
query?: QueryContainer
5151
}
5252
}

specification/_global/field_caps/FieldCapabilitiesRequest.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ import { integer } from '@_types/Numeric'
2727
* @stability stable
2828
*/
2929
export interface Request extends RequestBase {
30-
path_parts?: {
30+
path_parts: {
3131
index?: Indices
3232
}
33-
query_parameters?: {
33+
query_parameters: {
3434
allow_no_indices?: boolean
3535
expand_wildcards?: ExpandWildcards
3636
fields?: Fields
3737
ignore_unavailable?: boolean
3838
include_unmapped?: boolean
3939
}
40-
body?: {
40+
body: {
4141
index_filter?: FieldCapabilitiesBodyIndexFilter
4242
}
4343
}

specification/_global/get/GetRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface Request extends RequestBase {
3939
/** Name of the index that contains the document. */
4040
index: IndexName
4141
}
42-
query_parameters?: {
42+
query_parameters: {
4343
/**
4444
* Specifies the node or shard the operation should be performed on. Random by default.
4545
*/

specification/_global/get_script/GetScriptRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface Request extends RequestBase {
3030
path_parts: {
3131
id: Id
3232
}
33-
query_parameters?: {
33+
query_parameters: {
3434
/** Specify timeout for connection to master */
3535
master_timeout?: Time
3636
}

specification/_global/index/IndexRequest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ import { Time } from '@_types/Time'
3838
* @stability stable
3939
*/
4040
export interface Request<TDocument> extends RequestBase {
41-
path_parts?: {
41+
path_parts: {
4242
id?: Id
4343
index: IndexName
4444
}
45-
query_parameters?: {
45+
query_parameters: {
4646
if_primary_term?: long
4747
if_seq_no?: SequenceNumber
4848
op_type?: OpType

specification/_global/mget/MultiGetRequest.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ import { MultiGetId, Operation } from './types'
2828
*
2929
*/
3030
export interface Request extends RequestBase {
31-
path_parts?: {
31+
path_parts: {
3232
index?: IndexName
3333
}
34-
query_parameters?: {
34+
query_parameters: {
3535
preference?: string
3636
realtime?: boolean // default: true
3737
refresh?: boolean // default: false
@@ -41,7 +41,7 @@ export interface Request extends RequestBase {
4141
_source_includes?: Fields
4242
stored_fields?: Fields
4343
}
44-
body?: {
44+
body: {
4545
docs?: Operation[]
4646
ids?: MultiGetId[]
4747
}

specification/_global/msearch/MultiSearchRequest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ import { Body, Header } from './types'
2828
* @stability stable
2929
*/
3030
export interface Request extends RequestBase {
31-
path_parts?: {
31+
path_parts: {
3232
/**
3333
* Comma-separated list of data streams, indices, and index aliases to search.
3434
*/
3535
index?: Indices
3636
}
37-
query_parameters?: {
37+
query_parameters: {
3838
/**
3939
* If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.
4040
*/

specification/_global/msearch_template/MultiSearchTemplateRequest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ import { TemplateItem } from './types'
2929
* @stability stable
3030
*/
3131
export interface Request extends RequestBase {
32-
path_parts?: {
32+
path_parts: {
3333
index?: Indices
3434
}
35-
query_parameters?: {
35+
query_parameters: {
3636
ccs_minimize_roundtrips?: boolean
3737
max_concurrent_searches?: long
3838
search_type?: SearchType

specification/_global/mtermvectors/MultiTermVectorsRequest.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ import { Operation } from './types'
3434
* @stability stable
3535
*/
3636
export interface Request extends RequestBase {
37-
path_parts?: {
37+
path_parts: {
3838
index?: IndexName
3939
}
40-
query_parameters?: {
40+
query_parameters: {
4141
ids?: Id[]
4242
fields?: Fields
4343
field_statistics?: boolean
@@ -51,7 +51,7 @@ export interface Request extends RequestBase {
5151
version?: VersionNumber
5252
version_type?: VersionType
5353
}
54-
body?: {
54+
body: {
5555
docs?: Operation[]
5656
ids?: Id[]
5757
}

specification/_global/open_point_in_time/OpenPointInTimeRequest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ import { Time } from '@_types/Time'
2727
* @stability stable
2828
*/
2929
export interface Request extends RequestBase {
30-
path_parts?: {
30+
path_parts: {
3131
index: Indices
3232
}
33-
query_parameters?: {
33+
query_parameters: {
3434
keep_alive?: Time
3535
}
3636
}

0 commit comments

Comments
 (0)