Fixes for the REST specification (#51791)
* REST: Test: Fix the `accept_enterprise` parameter for Get License API (#51527)
The Get License API specifies the `accept_enterprise` parameter as a `boolean`:
0ca5cb8cb6/x-pack/plugin/src/test/resources/rest-api-spec/api/license.get.json (L22-L27)
In the test, a `string` is passed however, which makes the test compilation fail in the Go client.
(cherry picked from commit e2a2169b3d44592057c143253bb56375ed3e4268)
* Fix the SQL API documentation in REST specification (#51534)
This patch fixes the SQL REST API documentation to conform to the current schema.
(cherry picked from commit c8b6a849852699883086a6ada42279f2f68d7e07)
* Fix the "slices" parameter for the Delete By Query API in the REST specification (#51535)
This patch updates the `type` parameter in the Delete By Query API: according to
[the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query-slice),
it can be set to "auto", but the type in the documentation allows only numerical values.
This prevents people from setting the parameter to "auto" eg. in the Go client,
which generates source from the specification, and sets the corresponding Go
type as number.
The patch uses the `|` notation, which we have discussed previously for encoding
a "polymorphic" parameter like this.
Related: https://github.com/elastic/go-elasticsearch/issues/77
* Fix the Enrich API documentation in REST specification (#51528)
This patch fixes the REST API documentation for the Enrich APIs to conform to the current schema.
(cherry picked from commit 59f28f4f2feeba3f6d2f0b632410577eacb28121)
This commit is contained in:
parent
ed170cc548
commit
050c4d4c89
|
@ -178,9 +178,9 @@
|
|||
"description": "The throttle for this request in sub-requests per second. -1 means no throttle."
|
||||
},
|
||||
"slices": {
|
||||
"type": "number",
|
||||
"type": "number|auto",
|
||||
"default": 1,
|
||||
"description": "The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."
|
||||
"description": "The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks."
|
||||
}
|
||||
},
|
||||
"body":{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"enrich.delete_policy": {
|
||||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-delete-policy.html",
|
||||
"documentation": {
|
||||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html"
|
||||
},
|
||||
"stability" : "stable",
|
||||
"url": {
|
||||
"paths": [
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"enrich.execute_policy": {
|
||||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-execute-policy.html",
|
||||
"documentation": {
|
||||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html"
|
||||
},
|
||||
"stability" : "stable",
|
||||
"url": {
|
||||
"paths": [
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"enrich.get_policy": {
|
||||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-get-policy.html",
|
||||
"documentation": {
|
||||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html"
|
||||
},
|
||||
"stability" : "stable",
|
||||
"url": {
|
||||
"paths": [
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"enrich.put_policy": {
|
||||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-put-policy.html",
|
||||
"documentation": {
|
||||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html"
|
||||
},
|
||||
"stability" : "stable",
|
||||
"url": {
|
||||
"paths": [
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"enrich.stats": {
|
||||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats.html",
|
||||
"documentation": {
|
||||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html"
|
||||
},
|
||||
"stability" : "stable",
|
||||
"url": {
|
||||
"paths": [
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"sql.clear_cursor":{
|
||||
"documentation":{
|
||||
"url":"Clear SQL cursor"
|
||||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-pagination.html",
|
||||
"description":"Clears the SQL cursor"
|
||||
},
|
||||
"stability":"stable",
|
||||
"url":{
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"sql.query":{
|
||||
"documentation":{
|
||||
"url":"Execute SQL"
|
||||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest-overview.html",
|
||||
"description":"Executes an SQL request"
|
||||
},
|
||||
"stability":"stable",
|
||||
"url":{
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"sql.translate":{
|
||||
"documentation":{
|
||||
"url":"Translate SQL into Elasticsearch queries"
|
||||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate.html",
|
||||
"description":"Translates SQL into Elasticsearch queries"
|
||||
},
|
||||
"stability":"stable",
|
||||
"url":{
|
||||
|
|
|
@ -29,7 +29,7 @@ teardown:
|
|||
|
||||
- do:
|
||||
license.get:
|
||||
accept_enterprise: "true"
|
||||
accept_enterprise: true
|
||||
|
||||
## a v5 license object has 12 attributes
|
||||
- length: { license: 12 }
|
||||
|
@ -41,7 +41,7 @@ teardown:
|
|||
|
||||
- do:
|
||||
license.get:
|
||||
accept_enterprise: "false"
|
||||
accept_enterprise: false
|
||||
|
||||
## a v4 license object has 11 attributes
|
||||
- length: { license: 11 }
|
||||
|
|
Loading…
Reference in New Issue