Skip to content

Commit

Permalink
[DOCS] Fix chunking in template API docs (#57632) (#57956)
Browse files Browse the repository at this point in the history
* [DOCS] Fix chunking in template API docs (#57632)

* [DOCS] Fix chunking in template API docs

* Fixed typo in xref

* Added anchor for beats xref

* Fixed example

* Fixed bad merge

* Fix merge issue & test.
  • Loading branch information
debadair authored Jun 10, 2020
1 parent 88dbdef commit cc9e00d
Show file tree
Hide file tree
Showing 3 changed files with 220 additions and 183 deletions.
5 changes: 4 additions & 1 deletion docs/reference/indices.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ index settings, aliases, mappings, and index templates.
[[index-templates]]
=== Index templates:
* <<indices-templates>>
* <<indices-delete-template>>
* <<indices-put-template>>
* <<indices-get-template>>
* <<indices-delete-template>>
* <<indices-component-template>>
* <<getting-component-templates>>
* <<indices-template-exists>>

[float]
Expand Down
122 changes: 60 additions & 62 deletions docs/reference/indices/component-templates.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[indices-component-template]]
=== Component template API
=== Put component template API
++++
<titleabbrev>Component template</titleabbrev>
<titleabbrev>Put component template</titleabbrev>
++++

Component templates are building blocks that specify mappings, settings, or alias configuration, but
Expand Down Expand Up @@ -74,66 +74,6 @@ You can use C-style /* */ block comments in component templates.
You can include comments anywhere in the request body,
except before the opening curly bracket.

[[getting-component-templates]]
===== Getting component templates

=== Get component template API
++++
<titleabbrev>Get component template</titleabbrev>
++++

Returns information about one or more component templates.

[source,console]
--------------------------------------------------
GET /_component_template/template_1
--------------------------------------------------

[[get-component-template-api-request]]
==== {api-request-title}

`GET /_component-template/<component-template>`


[[get-component-template-api-path-params]]
==== {api-path-parms-title}

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-template]
+
To return all component templates, omit this parameter or use a value of `*`.


[[get-component-template-api-query-params]]
==== {api-query-parms-title}

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]


[[get-component-template-api-example]]
==== {api-examples-title}


[[get-component-template-api-wildcard-ex]]
===== Get component templates using a wildcard expression

[source,console]
--------------------------------------------------
GET /_component_template/temp*
--------------------------------------------------


[[get-component-template-api-all-ex]]
===== Get all component templates

[source,console]
--------------------------------------------------
GET /_component_template
--------------------------------------------------

[[put-component-template-api-path-params]]
==== {api-path-parms-title}

Expand Down Expand Up @@ -270,3 +210,61 @@ PUT /_component_template/template_1
--------------------------------------------------

To check the `_meta`, you can use the <<getting-component-templates,get component template>> API.

[[getting-component-templates]]
=== Get component template API
++++
<titleabbrev>Get component template</titleabbrev>
++++

Returns information about one or more component templates.

[source,console]
--------------------------------------------------
GET /_component_template/template_1
--------------------------------------------------

[[get-component-template-api-request]]
==== {api-request-title}

`GET /_component-template/<component-template>`


[[get-component-template-api-path-params]]
==== {api-path-parms-title}

include::{docdir}/rest-api/common-parms.asciidoc[tag=index-template]
+
To return all component templates, omit this parameter or use a value of `*`.


[[get-component-template-api-query-params]]
==== {api-query-parms-title}

include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings]

include::{docdir}/rest-api/common-parms.asciidoc[tag=local]

include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout]


[[get-component-template-api-example]]
==== {api-examples-title}


[[get-component-template-api-wildcard-ex]]
===== Get component templates using a wildcard expression

[source,console]
--------------------------------------------------
GET /_component_template/temp*
--------------------------------------------------


[[get-component-template-api-all-ex]]
===== Get all component templates

[source,console]
--------------------------------------------------
GET /_component_template
--------------------------------------------------
Loading

0 comments on commit cc9e00d

Please sign in to comment.