Skip to content

Commit a2a502b

Browse files
authored
Fixes for API specification (#46522)
Follow-up of #42346
1 parent faf6ef8 commit a2a502b

14 files changed

+38
-53
lines changed

rest-api-spec/src/main/resources/rest-api-spec/api/clear_scroll.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"clear_scroll":{
33
"documentation":{
4-
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll",
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api",
55
"description":"Explicitly clears the search context for a scroll."
66
},
77
"stability":"stable",

rest-api-spec/src/main/resources/rest-api-spec/api/exists_source.json

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
},
4040
"type":{
4141
"type":"string",
42-
"required":false,
4342
"description":"The type of the document; deprecated and optional starting with 7.0",
4443
"deprecated":true
4544
}

rest-api-spec/src/main/resources/rest-api-spec/api/get_source.json

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
},
4040
"type":{
4141
"type":"string",
42-
"required":false,
4342
"description":"The type of the document; deprecated and optional starting with 7.0",
4443
"deprecated":true
4544
}

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

-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
"parts": {
1717
"index": {
1818
"type": "string",
19-
"required": true,
2019
"description": "The name of the source index to clone"
2120
},
2221
"target": {
2322
"type": "string",
24-
"required": true,
2523
"description": "The name of the target index to clone into"
2624
}
2725
}

rest-api-spec/src/main/resources/rest-api-spec/api/info.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"info":{
33
"documentation":{
4-
"url":"https://www.elastic.co/guide/",
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html",
55
"description":"Returns basic information about the cluster."
66
},
77
"stability":"stable",

rest-api-spec/src/main/resources/rest-api-spec/api/mtermvectors.json

+10-20
Original file line numberDiff line numberDiff line change
@@ -32,58 +32,48 @@
3232
"params":{
3333
"ids":{
3434
"type":"list",
35-
"description":"A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body",
36-
"required":false
35+
"description":"A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body"
3736
},
3837
"term_statistics":{
3938
"type":"boolean",
4039
"description":"Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
41-
"default":false,
42-
"required":false
40+
"default":false
4341
},
4442
"field_statistics":{
4543
"type":"boolean",
4644
"description":"Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
47-
"default":true,
48-
"required":false
45+
"default":true
4946
},
5047
"fields":{
5148
"type":"list",
52-
"description":"A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
53-
"required":false
49+
"description":"A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
5450
},
5551
"offsets":{
5652
"type":"boolean",
5753
"description":"Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
58-
"default":true,
59-
"required":false
54+
"default":true
6055
},
6156
"positions":{
6257
"type":"boolean",
6358
"description":"Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
64-
"default":true,
65-
"required":false
59+
"default":true
6660
},
6761
"payloads":{
6862
"type":"boolean",
6963
"description":"Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
70-
"default":true,
71-
"required":false
64+
"default":true
7265
},
7366
"preference":{
7467
"type":"string",
75-
"description":"Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
76-
"required":false
68+
"description":"Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
7769
},
7870
"routing":{
7971
"type":"string",
80-
"description":"Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
81-
"required":false
72+
"description":"Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
8273
},
8374
"realtime":{
8475
"type":"boolean",
85-
"description":"Specifies if requests are real-time as opposed to near-real-time (default: true).",
86-
"required":false
76+
"description":"Specifies if requests are real-time as opposed to near-real-time (default: true)."
8777
},
8878
"version":{
8979
"type":"number",

rest-api-spec/src/main/resources/rest-api-spec/api/ping.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ping":{
33
"documentation":{
4-
"url":"https://www.elastic.co/guide/",
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html",
55
"description":"Returns whether the cluster is running."
66
},
77
"stability":"stable",

rest-api-spec/src/main/resources/rest-api-spec/api/render_search_template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"render_search_template":{
33
"documentation":{
4-
"url":"http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html",
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates",
55
"description":"Allows to use the Mustache language to pre-render a search definition."
66
},
77
"stability":"stable",

rest-api-spec/src/main/resources/rest-api-spec/api/snapshot.cleanup_repository.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"snapshot.cleanup_repository": {
3-
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html",
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html",
5+
"description": "Removes stale data from repository."
6+
},
47
"stability": "stable",
58
"url": {
69
"paths": [
@@ -12,7 +15,6 @@
1215
"parts": {
1316
"repository": {
1417
"type": "string",
15-
"required" : true,
1618
"description": "A repository name"
1719
}
1820
}

rest-api-spec/src/main/resources/rest-api-spec/api/termvectors.json

+9-18
Original file line numberDiff line numberDiff line change
@@ -43,52 +43,43 @@
4343
"term_statistics":{
4444
"type":"boolean",
4545
"description":"Specifies if total term frequency and document frequency should be returned.",
46-
"default":false,
47-
"required":false
46+
"default":false
4847
},
4948
"field_statistics":{
5049
"type":"boolean",
5150
"description":"Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.",
52-
"default":true,
53-
"required":false
51+
"default":true
5452
},
5553
"fields":{
5654
"type":"list",
57-
"description":"A comma-separated list of fields to return.",
58-
"required":false
55+
"description":"A comma-separated list of fields to return."
5956
},
6057
"offsets":{
6158
"type":"boolean",
6259
"description":"Specifies if term offsets should be returned.",
63-
"default":true,
64-
"required":false
60+
"default":true
6561
},
6662
"positions":{
6763
"type":"boolean",
6864
"description":"Specifies if term positions should be returned.",
69-
"default":true,
70-
"required":false
65+
"default":true
7166
},
7267
"payloads":{
7368
"type":"boolean",
7469
"description":"Specifies if term payloads should be returned.",
75-
"default":true,
76-
"required":false
70+
"default":true
7771
},
7872
"preference":{
7973
"type":"string",
80-
"description":"Specify the node or shard the operation should be performed on (default: random).",
81-
"required":false
74+
"description":"Specify the node or shard the operation should be performed on (default: random)."
8275
},
8376
"routing":{
8477
"type":"string",
85-
"description":"Specific routing value.",
86-
"required":false
78+
"description":"Specific routing value."
8779
},
8880
"realtime":{
8981
"type":"boolean",
90-
"description":"Specifies if request is real-time as opposed to near-real-time (default: true).",
91-
"required":false
82+
"description":"Specifies if request is real-time as opposed to near-real-time (default: true)."
9283
},
9384
"version":{
9485
"type":"number",

x-pack/plugin/src/test/resources/rest-api-spec/api/slm.delete_lifecycle.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"slm.delete_lifecycle":{
33
"documentation":{
4-
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api.html"
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete.html"
55
},
66
"stability":"stable",
77
"url":{
@@ -10,7 +10,13 @@
1010
"path":"/_slm/policy/{policy_id}",
1111
"methods":[
1212
"DELETE"
13-
]
13+
],
14+
"parts":{
15+
"policy_id":{
16+
"type":"string",
17+
"description":"The id of the snapshot lifecycle policy to remove"
18+
}
19+
}
1420
}
1521
]
1622
},

x-pack/plugin/src/test/resources/rest-api-spec/api/slm.execute_lifecycle.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"slm.execute_lifecycle":{
33
"documentation":{
4-
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api.html"
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute.html"
55
},
66
"stability":"stable",
77
"url":{

x-pack/plugin/src/test/resources/rest-api-spec/api/slm.get_lifecycle.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"slm.get_lifecycle":{
33
"documentation":{
4-
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api.html"
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get.html"
55
},
66
"stability":"stable",
77
"url":{

x-pack/plugin/src/test/resources/rest-api-spec/api/slm.put_lifecycle.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"slm.put_lifecycle":{
33
"documentation":{
4-
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api.html"
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put.html"
55
},
66
"stability":"stable",
77
"url":{

0 commit comments

Comments
 (0)