Skip to content

Commit

Permalink
Fix body nullability (#2464)
Browse files Browse the repository at this point in the history
Related to #2463
  • Loading branch information
flobernd authored Mar 25, 2024
1 parent 8bc044d commit a20d260
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion specification/_global/bulk/BulkRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
// This declaration captures action_and_meta_data (OperationContainer) and the two kinds of sources
// that can follow: an update action for update operations and anything for index or create operations.
// /!\ must be kept in sync with BulkMonitoringRequest
body?: Array<
body: Array<
OperationContainer | UpdateAction<TDocument, TPartialDocument> | TDocument
>
}
2 changes: 1 addition & 1 deletion specification/_global/create/CreateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ export interface Request<TDocument> extends RequestBase {
/**
* Request body contains the JSON source for the document data.
* @codegen_name document */
body?: TDocument
body: TDocument
}
2 changes: 1 addition & 1 deletion specification/_global/index/IndexRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,5 @@ export interface Request<TDocument> extends RequestBase {
/**
* Request body contains the JSON source for the document data.
*/
body?: TDocument
body: TDocument
}
2 changes: 1 addition & 1 deletion specification/_global/msearch/MultiSearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ export interface Request extends RequestBase {
typed_keys?: boolean
}
/** @codegen_name searches */
body?: Array<RequestItem>
body: Array<RequestItem>
}
2 changes: 1 addition & 1 deletion specification/fleet/msearch/MultiSearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,5 @@ export interface Request extends RequestBase {
allow_partial_search_results?: boolean
}
/** @codegen_name searches */
body?: Array<RequestItem>
body: Array<RequestItem>
}
2 changes: 1 addition & 1 deletion specification/indices/downsample/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ export interface Request extends RequestBase {
target_index: IndexName
}
/** @codegen_name config */
body?: DownsampleConfig
body: DownsampleConfig
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ import { RequestBase } from '@_types/Base'
*/
export interface Request extends RequestBase {
/** @codegen_name detector */
body?: Detector
body: Detector
}
2 changes: 1 addition & 1 deletion specification/monitoring/bulk/BulkMonitoringRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
/** @codegen_name operations */
// BulkMonitoringRequest accepts a body request that has the same format as the BulkRequest
// See BulkRequest for additional notes.
body?: Array<
body: Array<
OperationContainer | UpdateAction<TDocument, TPartialDocument> | TDocument
>
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ export interface Request extends RequestBase {
refresh?: Refresh
}
/** @codegen_name privileges */
body?: Dictionary<string, Dictionary<string, Actions>>
body: Dictionary<string, Dictionary<string, Actions>>
}

0 comments on commit a20d260

Please sign in to comment.