Skip to content

Commit 0de183f

Browse files
committed
Fixes for API specification (elastic#46522)
Follow-up of elastic#42346
1 parent 7b67417 commit 0de183f

14 files changed

+38
-53
lines changed

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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,58 +51,48 @@
5151
"params":{
5252
"ids":{
5353
"type":"list",
54-
"description":"A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body",
55-
"required":false
54+
"description":"A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body"
5655
},
5756
"term_statistics":{
5857
"type":"boolean",
5958
"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\".",
60-
"default":false,
61-
"required":false
59+
"default":false
6260
},
6361
"field_statistics":{
6462
"type":"boolean",
6563
"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\".",
66-
"default":true,
67-
"required":false
64+
"default":true
6865
},
6966
"fields":{
7067
"type":"list",
71-
"description":"A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
72-
"required":false
68+
"description":"A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
7369
},
7470
"offsets":{
7571
"type":"boolean",
7672
"description":"Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
77-
"default":true,
78-
"required":false
73+
"default":true
7974
},
8075
"positions":{
8176
"type":"boolean",
8277
"description":"Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
83-
"default":true,
84-
"required":false
78+
"default":true
8579
},
8680
"payloads":{
8781
"type":"boolean",
8882
"description":"Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
89-
"default":true,
90-
"required":false
83+
"default":true
9184
},
9285
"preference":{
9386
"type":"string",
94-
"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\".",
95-
"required":false
87+
"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\"."
9688
},
9789
"routing":{
9890
"type":"string",
99-
"description":"Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
100-
"required":false
91+
"description":"Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
10192
},
10293
"realtime":{
10394
"type":"boolean",
104-
"description":"Specifies if requests are real-time as opposed to near-real-time (default: true).",
105-
"required":false
95+
"description":"Specifies if requests are real-time as opposed to near-real-time (default: true)."
10696
},
10797
"version":{
10898
"type":"number",

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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 2 deletions
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

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,52 +87,43 @@
8787
"term_statistics":{
8888
"type":"boolean",
8989
"description":"Specifies if total term frequency and document frequency should be returned.",
90-
"default":false,
91-
"required":false
90+
"default":false
9291
},
9392
"field_statistics":{
9493
"type":"boolean",
9594
"description":"Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.",
96-
"default":true,
97-
"required":false
95+
"default":true
9896
},
9997
"fields":{
10098
"type":"list",
101-
"description":"A comma-separated list of fields to return.",
102-
"required":false
99+
"description":"A comma-separated list of fields to return."
103100
},
104101
"offsets":{
105102
"type":"boolean",
106103
"description":"Specifies if term offsets should be returned.",
107-
"default":true,
108-
"required":false
104+
"default":true
109105
},
110106
"positions":{
111107
"type":"boolean",
112108
"description":"Specifies if term positions should be returned.",
113-
"default":true,
114-
"required":false
109+
"default":true
115110
},
116111
"payloads":{
117112
"type":"boolean",
118113
"description":"Specifies if term payloads should be returned.",
119-
"default":true,
120-
"required":false
114+
"default":true
121115
},
122116
"preference":{
123117
"type":"string",
124-
"description":"Specify the node or shard the operation should be performed on (default: random).",
125-
"required":false
118+
"description":"Specify the node or shard the operation should be performed on (default: random)."
126119
},
127120
"routing":{
128121
"type":"string",
129-
"description":"Specific routing value.",
130-
"required":false
122+
"description":"Specific routing value."
131123
},
132124
"realtime":{
133125
"type":"boolean",
134-
"description":"Specifies if request is real-time as opposed to near-real-time (default: true).",
135-
"required":false
126+
"description":"Specifies if request is real-time as opposed to near-real-time (default: true)."
136127
},
137128
"version":{
138129
"type":"number",

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

Lines changed: 8 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)