From f9d5bd5ac09556f8c6d2b923f3767f824bcaf08a Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 13 Oct 2025 16:38:41 +0400 Subject: [PATCH] Specify more bodies as optional (#5469) Based on Elasticsearch YAML tests (cherry picked from commit 50cdd12dd69654a6aa37ac4f48ff35100014c5b2) --- output/openapi/elasticsearch-openapi.json | 78 +++++++------------ .../elasticsearch-serverless-openapi.json | 45 ++++------- output/schema/schema.json | 52 ++++++------- .../clear_scroll/ClearScrollRequest.ts | 2 +- specification/_global/count/CountRequest.ts | 2 +- .../_global/explain/ExplainRequest.ts | 2 +- .../field_caps/FieldCapabilitiesRequest.ts | 2 +- .../OpenPointInTimeRequest.ts | 2 +- specification/_global/scroll/ScrollRequest.ts | 2 +- specification/_global/search/SearchRequest.ts | 2 +- .../update_by_query/UpdateByQueryRequest.ts | 2 +- .../ClusterAllocationExplainRequest.ts | 2 +- .../cluster/reroute/ClusterRerouteRequest.ts | 2 +- .../indices/clone/IndicesCloneRequest.ts | 2 +- .../indices/create/IndicesCreateRequest.ts | 2 +- .../rollover/IndicesRolloverRequest.ts | 2 +- .../IndicesValidateQueryRequest.ts | 2 +- .../license/post/PostLicenseRequest.ts | 2 +- .../MlDeleteExpiredDataRequest.ts | 2 +- .../ml/flush_job/MlFlushJobRequest.ts | 2 +- .../ml/get_buckets/MlGetBucketsRequest.ts | 2 +- .../ml/get_calendars/MlGetCalendarsRequest.ts | 2 +- .../get_categories/MlGetCategoriesRequest.ts | 2 +- .../MlGetInfluencersRequest.ts | 2 +- .../MlGetModelSnapshotsRequest.ts | 2 +- .../MlGetOverallBucketsRequest.ts | 2 +- .../get_records/MlGetAnomalyRecordsRequest.ts | 2 +- .../MlRevertModelSnapshotRequest.ts | 2 +- .../start_datafeed/MlStartDatafeedRequest.ts | 2 +- 29 files changed, 93 insertions(+), 134 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index a47db2177a..72e724248d 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -5398,8 +5398,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -14616,8 +14615,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -29273,8 +29271,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -31899,8 +31896,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -32146,8 +32142,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -35392,8 +35387,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -51893,8 +51887,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -146333,8 +146326,7 @@ } } } - }, - "required": true + } }, "cluster.allocation_explain": { "content": { @@ -146381,8 +146373,7 @@ } } } - }, - "required": true + } }, "cluster.put_component_template": { "content": { @@ -146502,8 +146493,7 @@ } } } - }, - "required": true + } }, "create": { "content": { @@ -146696,8 +146686,7 @@ } } } - }, - "required": true + } }, "field_caps": { "content": { @@ -146740,8 +146729,7 @@ } } } - }, - "required": true + } }, "fleet.msearch": { "content": { @@ -147184,8 +147172,7 @@ } } } - }, - "required": true + } }, "indices.create_from": { "content": { @@ -147600,8 +147587,7 @@ } } } - }, - "required": true + } }, "indices.shrink": { "content": { @@ -147767,8 +147753,7 @@ } } } - }, - "required": true + } }, "inference.inference": { "content": { @@ -147913,8 +147898,7 @@ } } } - }, - "required": true + } }, "mget": { "content": { @@ -147987,8 +147971,7 @@ } } } - }, - "required": true + } }, "ml.explain_data_frame_analytics": { "content": { @@ -148127,8 +148110,7 @@ } } } - }, - "required": true + } }, "ml.get_calendars": { "content": { @@ -148147,8 +148129,7 @@ } } } - }, - "required": true + } }, "ml.get_categories": { "content": { @@ -148173,8 +148154,7 @@ } } } - }, - "required": true + } }, "ml.get_influencers": { "content": { @@ -148199,8 +148179,7 @@ } } } - }, - "required": true + } }, "ml.get_model_snapshots": { "content": { @@ -148253,8 +148232,7 @@ } } } - }, - "required": true + } }, "ml.get_overall_buckets": { "content": { @@ -148314,8 +148292,7 @@ } } } - }, - "required": true + } }, "ml.get_records": { "content": { @@ -148381,8 +148358,7 @@ } } } - }, - "required": true + } }, "ml.preview_data_frame_analytics": { "content": { @@ -148788,8 +148764,7 @@ } } } - }, - "required": true + } }, "search": { "content": { @@ -149106,8 +149081,7 @@ } } } - }, - "required": true + } }, "search_application.search": { "content": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 6c8a7604ec..d4a5eb055b 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -7865,8 +7865,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -18519,8 +18518,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -20173,8 +20171,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -22385,8 +22382,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -29543,8 +29539,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -89030,8 +89025,7 @@ } } } - }, - "required": true + } }, "cluster.put_component_template": { "content": { @@ -89151,8 +89145,7 @@ } } } - }, - "required": true + } }, "create": { "content": { @@ -89345,8 +89338,7 @@ } } } - }, - "required": true + } }, "field_caps": { "content": { @@ -89389,8 +89381,7 @@ } } } - }, - "required": true + } }, "index": { "content": { @@ -89862,8 +89853,7 @@ } } } - }, - "required": true + } }, "indices.simulate_template": { "content": { @@ -89965,8 +89955,7 @@ } } } - }, - "required": true + } }, "inference.inference": { "content": { @@ -90132,8 +90121,7 @@ } } } - }, - "required": true + } }, "ml.get_overall_buckets": { "content": { @@ -90193,8 +90181,7 @@ } } } - }, - "required": true + } }, "ml.preview_data_frame_analytics": { "content": { @@ -90532,8 +90519,7 @@ } } } - }, - "required": true + } }, "search": { "content": { @@ -90841,8 +90827,7 @@ } } } - }, - "required": true + } }, "search_application.search": { "content": { diff --git a/output/schema/schema.json b/output/schema/schema.json index a55df0e70e..7b76d29f0a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -2292,7 +2292,7 @@ "name": "Request", "namespace": "_global.clear_scroll" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json", "text/plain" @@ -2387,7 +2387,7 @@ "name": "Request", "namespace": "cluster.allocation_explain" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -2927,7 +2927,7 @@ "name": "Request", "namespace": "cluster.reroute" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -4333,7 +4333,7 @@ "name": "Request", "namespace": "_global.count" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -5428,7 +5428,7 @@ "name": "Request", "namespace": "_global.explain" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -5548,7 +5548,7 @@ "name": "Request", "namespace": "_global.field_caps" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -6768,7 +6768,7 @@ "name": "Request", "namespace": "indices.clone" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -6855,7 +6855,7 @@ "name": "Request", "namespace": "indices.create" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -9253,7 +9253,7 @@ "name": "Request", "namespace": "indices.rollover" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -9668,7 +9668,7 @@ "name": "Request", "namespace": "indices.validate_query" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -11946,7 +11946,7 @@ "name": "Request", "namespace": "license.post" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -12692,7 +12692,7 @@ "name": "Request", "namespace": "ml.delete_expired_data" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -13161,7 +13161,7 @@ "name": "Request", "namespace": "ml.flush_job" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -13253,7 +13253,7 @@ "name": "Request", "namespace": "ml.get_buckets" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -13350,7 +13350,7 @@ "name": "Request", "namespace": "ml.get_calendars" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -13404,7 +13404,7 @@ "name": "Request", "namespace": "ml.get_categories" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -13703,7 +13703,7 @@ "name": "Request", "namespace": "ml.get_influencers" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -13939,7 +13939,7 @@ "name": "Request", "namespace": "ml.get_model_snapshots" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -13993,7 +13993,7 @@ "name": "Request", "namespace": "ml.get_overall_buckets" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -14040,7 +14040,7 @@ "name": "Request", "namespace": "ml.get_records" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -15031,7 +15031,7 @@ "name": "Request", "namespace": "ml.revert_model_snapshot" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -15172,7 +15172,7 @@ "name": "Request", "namespace": "ml.start_datafeed" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -16391,7 +16391,7 @@ "name": "Request", "namespace": "_global.open_point_in_time" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -17634,7 +17634,7 @@ "name": "Request", "namespace": "_global.scroll" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -17692,7 +17692,7 @@ "name": "Request", "namespace": "_global.search" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], @@ -24223,7 +24223,7 @@ "name": "Request", "namespace": "_global.update_by_query" }, - "requestBodyRequired": true, + "requestBodyRequired": false, "requestMediaType": [ "application/json" ], diff --git a/specification/_global/clear_scroll/ClearScrollRequest.ts b/specification/_global/clear_scroll/ClearScrollRequest.ts index ff2e53cdfd..0ea0ad6cf5 100644 --- a/specification/_global/clear_scroll/ClearScrollRequest.ts +++ b/specification/_global/clear_scroll/ClearScrollRequest.ts @@ -51,7 +51,7 @@ export interface Request extends RequestBase { */ scroll_id?: ScrollIds } - body: { + body?: { /** * The scroll IDs to clear. * To clear all scroll IDs, use `_all`. diff --git a/specification/_global/count/CountRequest.ts b/specification/_global/count/CountRequest.ts index 894e9912f3..cb3a72388d 100644 --- a/specification/_global/count/CountRequest.ts +++ b/specification/_global/count/CountRequest.ts @@ -161,7 +161,7 @@ export interface Request extends RequestBase { */ q?: string } - body: { + body?: { /** * Defines the search query using Query DSL. A request body query cannot be used * with the `q` query string parameter. diff --git a/specification/_global/explain/ExplainRequest.ts b/specification/_global/explain/ExplainRequest.ts index 9333092ae2..efa9fbe657 100644 --- a/specification/_global/explain/ExplainRequest.ts +++ b/specification/_global/explain/ExplainRequest.ts @@ -116,7 +116,7 @@ export interface Request extends RequestBase { */ q?: string } - body: { + body?: { /** * Defines the search definition using the Query DSL. */ diff --git a/specification/_global/field_caps/FieldCapabilitiesRequest.ts b/specification/_global/field_caps/FieldCapabilitiesRequest.ts index d1a24c0e6d..9fab39a69e 100644 --- a/specification/_global/field_caps/FieldCapabilitiesRequest.ts +++ b/specification/_global/field_caps/FieldCapabilitiesRequest.ts @@ -120,7 +120,7 @@ export interface Request extends RequestBase { */ project_routing?: ProjectRouting } - body: { + body?: { /** * A list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. * @availability stack since=8.5.0 diff --git a/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts b/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts index c9e0d7ba51..af23429e0e 100644 --- a/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts +++ b/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts @@ -135,7 +135,7 @@ export interface Request extends RequestBase { */ max_concurrent_shard_requests?: integer } - body: { + body?: { /** * Filter indices if the provided query rewrites to `match_none` on every shard. */ diff --git a/specification/_global/scroll/ScrollRequest.ts b/specification/_global/scroll/ScrollRequest.ts index 2bf16e9b46..cfca34a718 100644 --- a/specification/_global/scroll/ScrollRequest.ts +++ b/specification/_global/scroll/ScrollRequest.ts @@ -75,7 +75,7 @@ export interface Request extends RequestBase { */ rest_total_hits_as_int?: boolean } - body: { + body?: { /** * The period to retain the search context for scrolling. * @doc_id scroll-search-results diff --git a/specification/_global/search/SearchRequest.ts b/specification/_global/search/SearchRequest.ts index 1e5563994f..992e299858 100644 --- a/specification/_global/search/SearchRequest.ts +++ b/specification/_global/search/SearchRequest.ts @@ -404,7 +404,7 @@ export interface Request extends RequestBase { force_synthetic_source?: boolean } // Keep this in sync with global/search/_types/SearchRequestBody.ts - body: { + body?: { /** * Defines the aggregations that are run as part of the search request. * @aliases aggs diff --git a/specification/_global/update_by_query/UpdateByQueryRequest.ts b/specification/_global/update_by_query/UpdateByQueryRequest.ts index 8bfa106785..00ebff42df 100644 --- a/specification/_global/update_by_query/UpdateByQueryRequest.ts +++ b/specification/_global/update_by_query/UpdateByQueryRequest.ts @@ -322,7 +322,7 @@ export interface Request extends RequestBase { */ wait_for_completion?: boolean } - body: { + body?: { /** * The maximum number of documents to update. */ diff --git a/specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts b/specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts index 50cda8f211..d70c3a847a 100644 --- a/specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts +++ b/specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts @@ -77,7 +77,7 @@ export interface Request extends RequestBase { */ master_timeout?: Duration } - body: { + body?: { /** * The name of the index that you would like an explanation for. */ diff --git a/specification/cluster/reroute/ClusterRerouteRequest.ts b/specification/cluster/reroute/ClusterRerouteRequest.ts index 93971e7bf1..06fb169930 100644 --- a/specification/cluster/reroute/ClusterRerouteRequest.ts +++ b/specification/cluster/reroute/ClusterRerouteRequest.ts @@ -82,7 +82,7 @@ export interface Request extends RequestBase { */ timeout?: Duration } - body: { + body?: { /** * Defines the commands to perform. */ diff --git a/specification/indices/clone/IndicesCloneRequest.ts b/specification/indices/clone/IndicesCloneRequest.ts index be0b51dfe9..0a9c9d11b2 100644 --- a/specification/indices/clone/IndicesCloneRequest.ts +++ b/specification/indices/clone/IndicesCloneRequest.ts @@ -113,7 +113,7 @@ export interface Request extends RequestBase { */ wait_for_active_shards?: WaitForActiveShards } - body: { + body?: { /** * Aliases for the resulting index. */ diff --git a/specification/indices/create/IndicesCreateRequest.ts b/specification/indices/create/IndicesCreateRequest.ts index 0f0d61ffc7..4e51f2e621 100644 --- a/specification/indices/create/IndicesCreateRequest.ts +++ b/specification/indices/create/IndicesCreateRequest.ts @@ -94,7 +94,7 @@ export interface Request extends RequestBase { */ wait_for_active_shards?: WaitForActiveShards } - body: { + body?: { /** * Aliases for the index. */ diff --git a/specification/indices/rollover/IndicesRolloverRequest.ts b/specification/indices/rollover/IndicesRolloverRequest.ts index c20ad407bf..22a02afe76 100644 --- a/specification/indices/rollover/IndicesRolloverRequest.ts +++ b/specification/indices/rollover/IndicesRolloverRequest.ts @@ -125,7 +125,7 @@ export interface Request extends RequestBase { */ lazy?: boolean } - body: { + body?: { /** * Aliases for the target index. * Data streams do not support this parameter. diff --git a/specification/indices/validate_query/IndicesValidateQueryRequest.ts b/specification/indices/validate_query/IndicesValidateQueryRequest.ts index 2dfcec193c..be4308f114 100644 --- a/specification/indices/validate_query/IndicesValidateQueryRequest.ts +++ b/specification/indices/validate_query/IndicesValidateQueryRequest.ts @@ -113,7 +113,7 @@ export interface Request extends RequestBase { */ q?: string } - body: { + body?: { /** * Query in the Lucene query string syntax. */ diff --git a/specification/license/post/PostLicenseRequest.ts b/specification/license/post/PostLicenseRequest.ts index 2f4737cfa2..c5fb72ecff 100644 --- a/specification/license/post/PostLicenseRequest.ts +++ b/specification/license/post/PostLicenseRequest.ts @@ -60,7 +60,7 @@ export interface Request extends RequestBase { */ timeout?: Duration } - body: { + body?: { license?: License /** * A sequence of one or more JSON documents containing the license information. diff --git a/specification/ml/delete_expired_data/MlDeleteExpiredDataRequest.ts b/specification/ml/delete_expired_data/MlDeleteExpiredDataRequest.ts index 638535bc04..27c1ec28da 100644 --- a/specification/ml/delete_expired_data/MlDeleteExpiredDataRequest.ts +++ b/specification/ml/delete_expired_data/MlDeleteExpiredDataRequest.ts @@ -70,7 +70,7 @@ export interface Request extends RequestBase { */ timeout?: Duration } - body: { + body?: { /** * The desired requests per second for the deletion processes. The default * behavior is no throttling. diff --git a/specification/ml/flush_job/MlFlushJobRequest.ts b/specification/ml/flush_job/MlFlushJobRequest.ts index dca143fc52..ac558c5867 100644 --- a/specification/ml/flush_job/MlFlushJobRequest.ts +++ b/specification/ml/flush_job/MlFlushJobRequest.ts @@ -83,7 +83,7 @@ export interface Request extends RequestBase { // Also accepts `now` as a value, epoch seconds (< 10 digits) and epoch milliseconds start?: DateTime } - body: { + body?: { /** * Refer to the description for the `advance_time` query parameter. */ diff --git a/specification/ml/get_buckets/MlGetBucketsRequest.ts b/specification/ml/get_buckets/MlGetBucketsRequest.ts index f452d5a1d0..9f0168958a 100644 --- a/specification/ml/get_buckets/MlGetBucketsRequest.ts +++ b/specification/ml/get_buckets/MlGetBucketsRequest.ts @@ -104,7 +104,7 @@ export interface Request extends RequestBase { */ start?: DateTime } - body: { + body?: { /** * Refer to the description for the `anomaly_score` query parameter. * @server_default 0.0 diff --git a/specification/ml/get_calendars/MlGetCalendarsRequest.ts b/specification/ml/get_calendars/MlGetCalendarsRequest.ts index ae8a6c6383..2dd33a526d 100644 --- a/specification/ml/get_calendars/MlGetCalendarsRequest.ts +++ b/specification/ml/get_calendars/MlGetCalendarsRequest.ts @@ -56,7 +56,7 @@ export interface Request extends RequestBase { */ size?: integer } - body: { + body?: { /** This object is supported only when you omit the calendar identifier. */ page?: Page } diff --git a/specification/ml/get_categories/MlGetCategoriesRequest.ts b/specification/ml/get_categories/MlGetCategoriesRequest.ts index 7321457adf..a558d95927 100644 --- a/specification/ml/get_categories/MlGetCategoriesRequest.ts +++ b/specification/ml/get_categories/MlGetCategoriesRequest.ts @@ -72,7 +72,7 @@ export interface Request extends RequestBase { */ size?: integer } - body: { + body?: { /** * Configures pagination. * This parameter has the `from` and `size` properties. diff --git a/specification/ml/get_influencers/MlGetInfluencersRequest.ts b/specification/ml/get_influencers/MlGetInfluencersRequest.ts index 43783153f3..43c0476c82 100644 --- a/specification/ml/get_influencers/MlGetInfluencersRequest.ts +++ b/specification/ml/get_influencers/MlGetInfluencersRequest.ts @@ -95,7 +95,7 @@ export interface Request extends RequestBase { */ start?: DateTime } - body: { + body?: { /** * Configures pagination. * This parameter has the `from` and `size` properties. diff --git a/specification/ml/get_model_snapshots/MlGetModelSnapshotsRequest.ts b/specification/ml/get_model_snapshots/MlGetModelSnapshotsRequest.ts index cb558866bc..b7e028c000 100644 --- a/specification/ml/get_model_snapshots/MlGetModelSnapshotsRequest.ts +++ b/specification/ml/get_model_snapshots/MlGetModelSnapshotsRequest.ts @@ -85,7 +85,7 @@ export interface Request extends RequestBase { */ start?: DateTime } - body: { + body?: { /** * Refer to the description for the `desc` query parameter. * @server_default false diff --git a/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts b/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts index 50bce7a831..54bbd5a805 100644 --- a/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts +++ b/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts @@ -117,7 +117,7 @@ export interface Request extends RequestBase { */ top_n?: integer } - body: { + body?: { /** * Refer to the description for the `allow_no_match` query parameter. * @server_default true diff --git a/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts b/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts index 4be39d7d94..dea86932d0 100644 --- a/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts +++ b/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts @@ -99,7 +99,7 @@ export interface Request extends RequestBase { */ start?: DateTime } - body: { + body?: { /** * Refer to the description for the `desc` query parameter. * @server_default false diff --git a/specification/ml/revert_model_snapshot/MlRevertModelSnapshotRequest.ts b/specification/ml/revert_model_snapshot/MlRevertModelSnapshotRequest.ts index 4456513949..2402d673a2 100644 --- a/specification/ml/revert_model_snapshot/MlRevertModelSnapshotRequest.ts +++ b/specification/ml/revert_model_snapshot/MlRevertModelSnapshotRequest.ts @@ -67,7 +67,7 @@ export interface Request extends RequestBase { */ delete_intervening_results?: boolean } - body: { + body?: { /** * Refer to the description for the `delete_intervening_results` query parameter. * @server_default false diff --git a/specification/ml/start_datafeed/MlStartDatafeedRequest.ts b/specification/ml/start_datafeed/MlStartDatafeedRequest.ts index 407431910c..1db92aae09 100644 --- a/specification/ml/start_datafeed/MlStartDatafeedRequest.ts +++ b/specification/ml/start_datafeed/MlStartDatafeedRequest.ts @@ -86,7 +86,7 @@ export interface Request extends RequestBase { * @server_default 20s */ timeout?: Duration } - body: { + body?: { /** Refer to the description for the `end` query parameter. */ end?: DateTime // default "" /** Refer to the description for the `start` query parameter. */