Skip to content

Commit cfb4704

Browse files
authored
[DOCS] Add code snippet testing for more ML APIs (#31404)
1 parent ffba20b commit cfb4704

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

x-pack/docs/build.gradle

-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ buildRestTests.expectedUnconvertedCandidates = [
5757
'en/rest-api/license/delete-license.asciidoc',
5858
'en/rest-api/license/update-license.asciidoc',
5959
'en/ml/api-quickref.asciidoc',
60-
'en/rest-api/ml/delete-calendar-event.asciidoc',
6160
'en/rest-api/ml/delete-snapshot.asciidoc',
6261
'en/rest-api/ml/forecast.asciidoc',
6362
'en/rest-api/ml/get-bucket.asciidoc',
@@ -71,8 +70,6 @@ buildRestTests.expectedUnconvertedCandidates = [
7170
'en/rest-api/ml/preview-datafeed.asciidoc',
7271
'en/rest-api/ml/revert-snapshot.asciidoc',
7372
'en/rest-api/ml/update-snapshot.asciidoc',
74-
'en/rest-api/ml/validate-detector.asciidoc',
75-
'en/rest-api/ml/validate-job.asciidoc',
7673
'en/rest-api/watcher/stats.asciidoc',
7774
'en/watcher/example-watches/watching-time-series-data.asciidoc',
7875
]

x-pack/docs/en/rest-api/ml/delete-calendar-event.asciidoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ calendar:
4444
DELETE _xpack/ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st
4545
--------------------------------------------------
4646
// CONSOLE
47-
// TEST[skip:automatically-generated ID]
47+
// TEST[catch:missing]
4848

4949
When the event is removed, you receive the following results:
5050
[source,js]
@@ -53,3 +53,4 @@ When the event is removed, you receive the following results:
5353
"acknowledged": true
5454
}
5555
----
56+
// NOTCONSOLE

x-pack/docs/en/rest-api/ml/validate-detector.asciidoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ see <<ml-detectorconfig,detector configuration objects>>.
2828
You must have `manage_ml`, or `manage` cluster privileges to use this API.
2929
For more information, see
3030
{xpack-ref}/security-privileges.html[Security Privileges].
31-
//<<privileges-list-cluster>>.
3231

3332

3433
==== Examples
@@ -45,7 +44,6 @@ POST _xpack/ml/anomaly_detectors/_validate/detector
4544
}
4645
--------------------------------------------------
4746
// CONSOLE
48-
// TEST[skip:todo]
4947

5048
When the validation completes, you receive the following results:
5149
[source,js]
@@ -54,3 +52,4 @@ When the validation completes, you receive the following results:
5452
"acknowledged": true
5553
}
5654
----
55+
// TESTRESPONSE

x-pack/docs/en/rest-api/ml/validate-job.asciidoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ see <<ml-job-resource,Job Resources>>.
2828
You must have `manage_ml`, or `manage` cluster privileges to use this API.
2929
For more information, see
3030
{xpack-ref}/security-privileges.html[Security Privileges].
31-
//<<privileges-list-cluster>>.
3231

3332

3433
==== Examples
@@ -56,7 +55,6 @@ POST _xpack/ml/anomaly_detectors/_validate
5655
}
5756
--------------------------------------------------
5857
// CONSOLE
59-
// TEST[skip:todo]
6058

6159
When the validation is complete, you receive the following results:
6260
[source,js]
@@ -65,3 +63,4 @@ When the validation is complete, you receive the following results:
6563
"acknowledged": true
6664
}
6765
----
66+
// TESTRESPONSE

0 commit comments

Comments
 (0)