Skip to content

Commit a20d260

Browse files
authored
Fix body nullability (elastic#2464)
Related to elastic#2463
1 parent 8bc044d commit a20d260

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

specification/_global/bulk/BulkRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
9797
// This declaration captures action_and_meta_data (OperationContainer) and the two kinds of sources
9898
// that can follow: an update action for update operations and anything for index or create operations.
9999
// /!\ must be kept in sync with BulkMonitoringRequest
100-
body?: Array<
100+
body: Array<
101101
OperationContainer | UpdateAction<TDocument, TPartialDocument> | TDocument
102102
>
103103
}

specification/_global/create/CreateRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,5 @@ export interface Request<TDocument> extends RequestBase {
9191
/**
9292
* Request body contains the JSON source for the document data.
9393
* @codegen_name document */
94-
body?: TDocument
94+
body: TDocument
9595
}

specification/_global/index/IndexRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,5 @@ export interface Request<TDocument> extends RequestBase {
113113
/**
114114
* Request body contains the JSON source for the document data.
115115
*/
116-
body?: TDocument
116+
body: TDocument
117117
}

specification/_global/msearch/MultiSearchRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,5 @@ export interface Request extends RequestBase {
9292
typed_keys?: boolean
9393
}
9494
/** @codegen_name searches */
95-
body?: Array<RequestItem>
95+
body: Array<RequestItem>
9696
}

specification/fleet/msearch/MultiSearchRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,5 @@ export interface Request extends RequestBase {
111111
allow_partial_search_results?: boolean
112112
}
113113
/** @codegen_name searches */
114-
body?: Array<RequestItem>
114+
body: Array<RequestItem>
115115
}

specification/indices/downsample/Request.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ export interface Request extends RequestBase {
4040
target_index: IndexName
4141
}
4242
/** @codegen_name config */
43-
body?: DownsampleConfig
43+
body: DownsampleConfig
4444
}

specification/ml/validate_detector/MlValidateDetectorRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ import { RequestBase } from '@_types/Base'
2727
*/
2828
export interface Request extends RequestBase {
2929
/** @codegen_name detector */
30-
body?: Detector
30+
body: Detector
3131
}

specification/monitoring/bulk/BulkMonitoringRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
5353
/** @codegen_name operations */
5454
// BulkMonitoringRequest accepts a body request that has the same format as the BulkRequest
5555
// See BulkRequest for additional notes.
56-
body?: Array<
56+
body: Array<
5757
OperationContainer | UpdateAction<TDocument, TPartialDocument> | TDocument
5858
>
5959
}

specification/security/put_privileges/SecurityPutPrivilegesRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ export interface Request extends RequestBase {
3333
refresh?: Refresh
3434
}
3535
/** @codegen_name privileges */
36-
body?: Dictionary<string, Dictionary<string, Actions>>
36+
body: Dictionary<string, Dictionary<string, Actions>>
3737
}

0 commit comments

Comments
 (0)