Skip to content

Commit f5ad565

Browse files
authored
rest-api-spec: fix required annotations (#138147)
* rest-api-spec: fix required annotations * Fix monitoring.bulk tests and spec
1 parent 37af8ba commit f5ad565

File tree

9 files changed

+9
-44
lines changed

9 files changed

+9
-44
lines changed

rest-api-spec/src/main/resources/rest-api-spec/api/indices.downsample.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@
2424
"parts": {
2525
"index": {
2626
"type": "string",
27-
"description": "The index to downsample",
28-
"required": true
27+
"description": "The index to downsample"
2928
},
3029
"target_index": {
3130
"type": "string",
32-
"description": "The name of the target index to store downsampled data",
33-
"required": true
31+
"description": "The name of the target index to store downsampled data"
3432
}
3533
}
3634
}

rest-api-spec/src/main/resources/rest-api-spec/api/ml.clear_trained_model_deployment_cache.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"parts": {
2525
"model_id": {
2626
"type": "string",
27-
"description": "The unique identifier of the trained model.",
28-
"required": true
27+
"description": "The unique identifier of the trained model."
2928
}
3029
}
3130
}

rest-api-spec/src/main/resources/rest-api-spec/api/ml.infer_trained_model.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"parts": {
2525
"model_id": {
2626
"type": "string",
27-
"description": "The unique identifier of the trained model.",
28-
"required": true
27+
"description": "The unique identifier of the trained model."
2928
}
3029
}
3130
}

rest-api-spec/src/main/resources/rest-api-spec/api/ml.start_trained_model_deployment.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"parts": {
2525
"model_id": {
2626
"type": "string",
27-
"description": "The unique identifier of the trained model.",
28-
"required": true
27+
"description": "The unique identifier of the trained model."
2928
}
3029
}
3130
}

rest-api-spec/src/main/resources/rest-api-spec/api/ml.stop_trained_model_deployment.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"parts": {
2525
"model_id": {
2626
"type": "string",
27-
"description": "The unique identifier of the trained model.",
28-
"required": true
27+
"description": "The unique identifier of the trained model."
2928
}
3029
}
3130
}

rest-api-spec/src/main/resources/rest-api-spec/api/monitoring.bulk.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@
2828
"params": {
2929
"system_id": {
3030
"type": "string",
31+
"required": true,
3132
"description": "Identifier of the monitored system"
3233
},
3334
"system_api_version": {
3435
"type": "string",
36+
"required": true,
3537
"description": "API Version of the monitored system"
3638
},
3739
"interval": {
3840
"type": "string",
41+
"required": true,
3942
"description": "Collection interval (e.g., '10s' or '10000ms') of the payload"
4043
}
4144
},

rest-api-spec/src/main/resources/rest-api-spec/api/transform.schedule_now_transform.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"parts": {
2525
"transform_id": {
2626
"type": "string",
27-
"required": true,
2827
"description": "The id of the transform."
2928
}
3029
}

rest-api-spec/src/main/resources/rest-api-spec/api/transform.update_transform.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"parts": {
2525
"transform_id": {
2626
"type": "string",
27-
"required": true,
2827
"description": "The id of the transform."
2928
}
3029
}

x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/monitoring/bulk/10_basic.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -139,36 +139,6 @@
139139

140140
- match: { hits.total: 0 }
141141

142-
# Missing a system_id causes it to fail
143-
- do:
144-
catch: bad_request
145-
monitoring.bulk:
146-
system_api_version: "7"
147-
interval: "10s"
148-
body:
149-
- '{"index": {"_type": "default_type"}}'
150-
- '{"field_1": "value_1"}'
151-
152-
# Missing a system_api_version causes it to fail
153-
- do:
154-
catch: bad_request
155-
monitoring.bulk:
156-
system_id: "kibana"
157-
interval: "10s"
158-
body:
159-
- '{"index": {"_type": "default_type"}}'
160-
- '{"field_1": "value_1"}'
161-
162-
# Missing an interval causes it to fail
163-
- do:
164-
catch: bad_request
165-
monitoring.bulk:
166-
system_id: "kibana"
167-
system_api_version: "7"
168-
body:
169-
- '{"index": {"_type": "default_type"}}'
170-
- '{"field_1": "value_1"}'
171-
172142
---
173143
"Bulk indexing of monitoring data on closed indices should throw an export exception":
174144
- skip:

0 commit comments

Comments
 (0)