Skip to content

Commit 1a23249

Browse files
committed
DOC-13663: Improve process for Search and Query REST API examples (#207)
* Bundle Query and FTS specs using Redocly * Build inline curl request, http request, and http response examples using handlebars templates * Remove unnecessary local examples * Remove unnecessary example partials * Update remaining example partials — they're just explanations now * Rename all existing http-request partials to curl-request * Add ID to examples * Fix xref in example partial * Remove example captions from Query API docs * Output default for response code 0 * Build output documentation
1 parent 4f54d96 commit 1a23249

243 files changed

Lines changed: 4283 additions & 2861 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/modules/analytics-rest-admin/pages/index.adoc

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,17 @@ include::{specDir}paths/cancel_request/operation-security-end.adoc[opts=optional
296296

297297
include::{specDir}paths/cancel_request/operation-security-after.adoc[opts=optional]
298298

299+
include::{snippetDir}cancel_request/curl-request.adoc[opts=optional]
300+
301+
302+
299303
include::{snippetDir}cancel_request/http-request.adoc[opts=optional]
300304

305+
ifeval::["" != ""]
306+
[#cancel_request-ex-response]
307+
= Example HTTP Response
308+
endif::[]
309+
301310
include::{snippetDir}cancel_request/http-response.adoc[opts=optional]
302311

303312
include::{specDir}paths/cancel_request/operation-end.adoc[opts=optional]
@@ -432,8 +441,17 @@ include::{specDir}paths/cluster_status/operation-security-end.adoc[opts=optional
432441

433442
include::{specDir}paths/cluster_status/operation-security-after.adoc[opts=optional]
434443

444+
include::{snippetDir}cluster_status/curl-request.adoc[opts=optional]
445+
446+
447+
435448
include::{snippetDir}cluster_status/http-request.adoc[opts=optional]
436449

450+
ifeval::["" != ""]
451+
[#cluster_status-ex-response]
452+
= Example HTTP Response
453+
endif::[]
454+
437455
include::{snippetDir}cluster_status/http-response.adoc[opts=optional]
438456

439457
include::{specDir}paths/cluster_status/operation-end.adoc[opts=optional]
@@ -568,8 +586,17 @@ include::{specDir}paths/completed_requests/operation-security-end.adoc[opts=opti
568586

569587
include::{specDir}paths/completed_requests/operation-security-after.adoc[opts=optional]
570588

589+
include::{snippetDir}completed_requests/curl-request.adoc[opts=optional]
590+
591+
592+
571593
include::{snippetDir}completed_requests/http-request.adoc[opts=optional]
572594

595+
ifeval::["" != ""]
596+
[#completed_requests-ex-response]
597+
= Example HTTP Response
598+
endif::[]
599+
573600
include::{snippetDir}completed_requests/http-response.adoc[opts=optional]
574601

575602
include::{specDir}paths/completed_requests/operation-end.adoc[opts=optional]
@@ -704,8 +731,17 @@ include::{specDir}paths/ingestion_status/operation-security-end.adoc[opts=option
704731

705732
include::{specDir}paths/ingestion_status/operation-security-after.adoc[opts=optional]
706733

734+
include::{snippetDir}ingestion_status/curl-request.adoc[opts=optional]
735+
736+
737+
707738
include::{snippetDir}ingestion_status/http-request.adoc[opts=optional]
708739

740+
ifeval::["" != ""]
741+
[#ingestion_status-ex-response]
742+
= Example HTTP Response
743+
endif::[]
744+
709745
include::{snippetDir}ingestion_status/http-response.adoc[opts=optional]
710746

711747
include::{specDir}paths/ingestion_status/operation-end.adoc[opts=optional]
@@ -845,8 +881,17 @@ include::{specDir}paths/monitor_node/operation-security-end.adoc[opts=optional]
845881

846882
include::{specDir}paths/monitor_node/operation-security-after.adoc[opts=optional]
847883

884+
include::{snippetDir}monitor_node/curl-request.adoc[opts=optional]
885+
886+
887+
848888
include::{snippetDir}monitor_node/http-request.adoc[opts=optional]
849889

890+
ifeval::["" != ""]
891+
[#monitor_node-ex-response]
892+
= Example HTTP Response
893+
endif::[]
894+
850895
include::{snippetDir}monitor_node/http-response.adoc[opts=optional]
851896

852897
include::{specDir}paths/monitor_node/operation-end.adoc[opts=optional]
@@ -980,8 +1025,17 @@ include::{specDir}paths/restart_cluster/operation-security-end.adoc[opts=optiona
9801025

9811026
include::{specDir}paths/restart_cluster/operation-security-after.adoc[opts=optional]
9821027

1028+
include::{snippetDir}restart_cluster/curl-request.adoc[opts=optional]
1029+
1030+
1031+
9831032
include::{snippetDir}restart_cluster/http-request.adoc[opts=optional]
9841033

1034+
ifeval::["" != ""]
1035+
[#restart_cluster-ex-response]
1036+
= Example HTTP Response
1037+
endif::[]
1038+
9851039
include::{snippetDir}restart_cluster/http-response.adoc[opts=optional]
9861040

9871041
include::{specDir}paths/restart_cluster/operation-end.adoc[opts=optional]
@@ -1115,8 +1169,17 @@ include::{specDir}paths/restart_node/operation-security-end.adoc[opts=optional]
11151169

11161170
include::{specDir}paths/restart_node/operation-security-after.adoc[opts=optional]
11171171

1172+
include::{snippetDir}restart_node/curl-request.adoc[opts=optional]
1173+
1174+
1175+
11181176
include::{snippetDir}restart_node/http-request.adoc[opts=optional]
11191177

1178+
ifeval::["" != ""]
1179+
[#restart_node-ex-response]
1180+
= Example HTTP Response
1181+
endif::[]
1182+
11201183
include::{snippetDir}restart_node/http-response.adoc[opts=optional]
11211184

11221185
include::{specDir}paths/restart_node/operation-end.adoc[opts=optional]
@@ -1251,8 +1314,17 @@ include::{specDir}paths/return_active_requests/operation-security-end.adoc[opts=
12511314

12521315
include::{specDir}paths/return_active_requests/operation-security-after.adoc[opts=optional]
12531316

1317+
include::{snippetDir}return_active_requests/curl-request.adoc[opts=optional]
1318+
1319+
1320+
12541321
include::{snippetDir}return_active_requests/http-request.adoc[opts=optional]
12551322

1323+
ifeval::["" != ""]
1324+
[#return_active_requests-ex-response]
1325+
= Example HTTP Response
1326+
endif::[]
1327+
12561328
include::{snippetDir}return_active_requests/http-response.adoc[opts=optional]
12571329

12581330
include::{specDir}paths/return_active_requests/operation-end.adoc[opts=optional]

docs/modules/analytics-rest-admin/partials/paths/cancel_request/http-request.adoc renamed to docs/modules/analytics-rest-admin/partials/paths/cancel_request/curl-request.adoc

File renamed without changes.

docs/modules/analytics-rest-admin/partials/paths/cluster_status/http-request.adoc renamed to docs/modules/analytics-rest-admin/partials/paths/cluster_status/curl-request.adoc

File renamed without changes.

docs/modules/analytics-rest-admin/partials/paths/completed_requests/http-request.adoc renamed to docs/modules/analytics-rest-admin/partials/paths/completed_requests/curl-request.adoc

File renamed without changes.

docs/modules/analytics-rest-admin/partials/paths/ingestion_status/http-request.adoc renamed to docs/modules/analytics-rest-admin/partials/paths/ingestion_status/curl-request.adoc

File renamed without changes.

docs/modules/analytics-rest-admin/partials/paths/monitor_node/http-request.adoc renamed to docs/modules/analytics-rest-admin/partials/paths/monitor_node/curl-request.adoc

File renamed without changes.

docs/modules/analytics-rest-admin/partials/paths/restart_cluster/http-request.adoc renamed to docs/modules/analytics-rest-admin/partials/paths/restart_cluster/curl-request.adoc

File renamed without changes.

docs/modules/analytics-rest-admin/partials/paths/restart_node/http-request.adoc renamed to docs/modules/analytics-rest-admin/partials/paths/restart_node/curl-request.adoc

File renamed without changes.

docs/modules/analytics-rest-admin/partials/paths/return_active_requests/http-request.adoc renamed to docs/modules/analytics-rest-admin/partials/paths/return_active_requests/curl-request.adoc

File renamed without changes.

docs/modules/analytics-rest-config/pages/index.adoc

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,17 @@ include::{specDir}paths/get_node/operation-security-end.adoc[opts=optional]
243243

244244
include::{specDir}paths/get_node/operation-security-after.adoc[opts=optional]
245245

246+
include::{snippetDir}get_node/curl-request.adoc[opts=optional]
247+
248+
249+
246250
include::{snippetDir}get_node/http-request.adoc[opts=optional]
247251

252+
ifeval::["" != ""]
253+
[#get_node-ex-response]
254+
= Example HTTP Response
255+
endif::[]
256+
248257
include::{snippetDir}get_node/http-response.adoc[opts=optional]
249258

250259
include::{specDir}paths/get_node/operation-end.adoc[opts=optional]
@@ -372,8 +381,17 @@ include::{specDir}paths/get_service/operation-security-end.adoc[opts=optional]
372381

373382
include::{specDir}paths/get_service/operation-security-after.adoc[opts=optional]
374383

384+
include::{snippetDir}get_service/curl-request.adoc[opts=optional]
385+
386+
387+
375388
include::{snippetDir}get_service/http-request.adoc[opts=optional]
376389

390+
ifeval::["" != ""]
391+
[#get_service-ex-response]
392+
= Example HTTP Response
393+
endif::[]
394+
377395
include::{snippetDir}get_service/http-response.adoc[opts=optional]
378396

379397
include::{specDir}paths/get_service/operation-end.adoc[opts=optional]
@@ -460,7 +478,7 @@ a¦ *Body* +
460478
optional
461479
a¦ [markdown]
462480
--
463-
481+
An object specifying one or more of the configurable node-level parameters on this node.
464482
--
465483

466484
[%hardbreaks]
@@ -553,8 +571,17 @@ include::{specDir}paths/put_node/operation-security-end.adoc[opts=optional]
553571

554572
include::{specDir}paths/put_node/operation-security-after.adoc[opts=optional]
555573

574+
include::{snippetDir}put_node/curl-request.adoc[opts=optional]
575+
576+
577+
556578
include::{snippetDir}put_node/http-request.adoc[opts=optional]
557579

580+
ifeval::["" != ""]
581+
[#put_node-ex-response]
582+
= Example HTTP Response
583+
endif::[]
584+
558585
include::{snippetDir}put_node/http-response.adoc[opts=optional]
559586

560587
include::{specDir}paths/put_node/operation-end.adoc[opts=optional]
@@ -639,7 +666,7 @@ a¦ *Body* +
639666
optional
640667
a¦ [markdown]
641668
--
642-
669+
An object specifying one or more of the configurable service-level parameters.
643670
--
644671

645672
[%hardbreaks]
@@ -732,8 +759,17 @@ include::{specDir}paths/put_service/operation-security-end.adoc[opts=optional]
732759

733760
include::{specDir}paths/put_service/operation-security-after.adoc[opts=optional]
734761

762+
include::{snippetDir}put_service/curl-request.adoc[opts=optional]
763+
764+
765+
735766
include::{snippetDir}put_service/http-request.adoc[opts=optional]
736767

768+
ifeval::["" != ""]
769+
[#put_service-ex-response]
770+
= Example HTTP Response
771+
endif::[]
772+
737773
include::{snippetDir}put_service/http-response.adoc[opts=optional]
738774

739775
include::{specDir}paths/put_service/operation-end.adoc[opts=optional]

0 commit comments

Comments
 (0)