From d9004aca3da812670faebc9b51c02ca5c2128784 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 22 Oct 2024 17:36:58 -0700 Subject: [PATCH 1/8] [OpenAPI] Edit mget API tag and summary --- docs/overlays/elasticsearch-shared-overlays.yaml | 2 -- specification/_global/mget/MultiGetRequest.ts | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 6150292046..5e6a2ae9f9 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -55,8 +55,6 @@ actions: externalDocs: description: Reading and writing documents url: https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-replication.html - - name: mget - x-displayName: Document - Multi get - name: mtermvectors x-displayName: Document - Multi term vectors - name: delete_by_query_rethrottle diff --git a/specification/_global/mget/MultiGetRequest.ts b/specification/_global/mget/MultiGetRequest.ts index 4b2271b3b4..ef2ae0d42c 100644 --- a/specification/_global/mget/MultiGetRequest.ts +++ b/specification/_global/mget/MultiGetRequest.ts @@ -23,10 +23,16 @@ import { Fields, Ids, IndexName, Routing } from '@_types/common' import { Operation } from './types' /** + * Get multiple documents. + * + * Get multiple JSON documents by ID from one or more indices. + * If you specify an index in the request URI, you only need to specify the document IDs in the request body. + * To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. * @rest_spec_name mget * @availability stack since=1.3.0 stability=stable * @availability serverless stability=stable visibility=public * @index_privileges read + * @doc_tag document */ export interface Request extends RequestBase { path_parts: { From 643092402cc19c8e0386baf8e38274a5c363a34b Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 22 Oct 2024 17:37:09 -0700 Subject: [PATCH 2/8] Generate output --- output/openapi/elasticsearch-openapi.json | 20 +++++++++++-------- .../elasticsearch-serverless-openapi.json | 20 +++++++++++-------- output/schema/schema.json | 7 ++++--- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index be06e8e079..26d3028d99 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -15904,9 +15904,10 @@ "/_mget": { "get": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget", "parameters": [ { @@ -15949,9 +15950,10 @@ }, "post": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget-1", "parameters": [ { @@ -15996,9 +15998,10 @@ "/{index}/_mget": { "get": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget-2", "parameters": [ { @@ -16044,9 +16047,10 @@ }, "post": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget-3", "parameters": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 2e4c9f2fa5..520651766f 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -9234,9 +9234,10 @@ "/_mget": { "get": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget", "parameters": [ { @@ -9276,9 +9277,10 @@ }, "post": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget-1", "parameters": [ { @@ -9320,9 +9322,10 @@ "/{index}/_mget": { "get": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget-2", "parameters": [ { @@ -9365,9 +9368,10 @@ }, "post": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget-3", "parameters": [ { diff --git a/output/schema/schema.json b/output/schema/schema.json index 09518e42d5..1b1d170e55 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -9266,7 +9266,8 @@ "stability": "stable" } }, - "description": "Allows to get multiple documents in one request.", + "description": "Get multiple documents.\n\nGet multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", + "docTag": "document", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html", "name": "mget", "privileges": { @@ -27252,7 +27253,7 @@ } ] }, - "description": "Allows to get multiple documents in one request.", + "description": "Get multiple documents.\n\nGet multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "inherits": { "type": { "name": "RequestBase", @@ -27403,7 +27404,7 @@ } } ], - "specLocation": "_global/mget/MultiGetRequest.ts#L25-L98" + "specLocation": "_global/mget/MultiGetRequest.ts#L25-L104" }, { "kind": "response", From c5c192ca58ea0b439d1208a0355236adbbbcbb50 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 22 Oct 2024 17:45:53 -0700 Subject: [PATCH 3/8] [OpenAPI] Edit multi term vectors API --- docs/overlays/elasticsearch-shared-overlays.yaml | 2 -- .../_global/mtermvectors/MultiTermVectorsRequest.ts | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 5e6a2ae9f9..7828f99121 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -55,8 +55,6 @@ actions: externalDocs: description: Reading and writing documents url: https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-replication.html - - name: mtermvectors - x-displayName: Document - Multi term vectors - name: delete_by_query_rethrottle x-displayName: Document - Rethrottle delete by query - name: update_by_query_rethrottle diff --git a/specification/_global/mtermvectors/MultiTermVectorsRequest.ts b/specification/_global/mtermvectors/MultiTermVectorsRequest.ts index e5a4e8d573..86b67b08bc 100644 --- a/specification/_global/mtermvectors/MultiTermVectorsRequest.ts +++ b/specification/_global/mtermvectors/MultiTermVectorsRequest.ts @@ -29,9 +29,17 @@ import { import { Operation } from './types' /** + * Get multiple term vectors. + * + * Get multiple term vectors with a single request. + * You can specify existing documents by index and ID or provide artificial documents in the body of the request. + * You can specify the index in the request body or request URI. + * The response contains a `docs` array with all the fetched termvectors. + * Each element has the structure provided by the termvectors API. * @rest_spec_name mtermvectors * @availability stack stability=stable * @availability serverless stability=stable visibility=public + * @doc_tag document */ export interface Request extends RequestBase { path_parts: { From 8b2ca73d1ba8c2305f0df4076aa967c490f24c21 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 22 Oct 2024 17:46:00 -0700 Subject: [PATCH 4/8] Generate output --- output/openapi/elasticsearch-openapi.json | 20 +++++++++++-------- .../elasticsearch-serverless-openapi.json | 20 +++++++++++-------- output/schema/schema.json | 7 ++++--- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 26d3028d99..e813a433b3 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -22678,9 +22678,10 @@ "/_mtermvectors": { "get": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors", "parameters": [ { @@ -22731,9 +22732,10 @@ }, "post": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-1", "parameters": [ { @@ -22786,9 +22788,10 @@ "/{index}/_mtermvectors": { "get": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-2", "parameters": [ { @@ -22842,9 +22845,10 @@ }, "post": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-3", "parameters": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 520651766f..fd6099f7b1 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -14007,9 +14007,10 @@ "/_mtermvectors": { "get": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors", "parameters": [ { @@ -14060,9 +14061,10 @@ }, "post": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-1", "parameters": [ { @@ -14115,9 +14117,10 @@ "/{index}/_mtermvectors": { "get": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-2", "parameters": [ { @@ -14171,9 +14174,10 @@ }, "post": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-3", "parameters": [ { diff --git a/output/schema/schema.json b/output/schema/schema.json index 1b1d170e55..0ed841f93f 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -12862,7 +12862,8 @@ "stability": "stable" } }, - "description": "Returns multiple termvectors in one request.", + "description": "Get multiple term vectors.\n\nGet multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", + "docTag": "document", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html", "name": "mtermvectors", "request": { @@ -28973,7 +28974,7 @@ } ] }, - "description": "Returns multiple termvectors in one request.", + "description": "Get multiple term vectors.\n\nGet multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "inherits": { "type": { "name": "RequestBase", @@ -29155,7 +29156,7 @@ } } ], - "specLocation": "_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L109" + "specLocation": "_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L117" }, { "kind": "response", From 09f41b2d6ba19565e36e955eec939bf0c3935c11 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 22 Oct 2024 17:48:19 -0700 Subject: [PATCH 5/8] Fix whitespace --- specification/_global/mget/MultiGetRequest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/_global/mget/MultiGetRequest.ts b/specification/_global/mget/MultiGetRequest.ts index ef2ae0d42c..a76d011a63 100644 --- a/specification/_global/mget/MultiGetRequest.ts +++ b/specification/_global/mget/MultiGetRequest.ts @@ -24,7 +24,7 @@ import { Operation } from './types' /** * Get multiple documents. - * + * * Get multiple JSON documents by ID from one or more indices. * If you specify an index in the request URI, you only need to specify the document IDs in the request body. * To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. From b57ff17db943d080c7dd57bdf897d2550c4b1eab Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 22 Oct 2024 17:53:21 -0700 Subject: [PATCH 6/8] More edits --- output/openapi/elasticsearch-openapi.json | 8 ++++---- output/openapi/elasticsearch-serverless-openapi.json | 8 ++++---- output/schema/schema.json | 6 +++--- .../_global/mtermvectors/MultiTermVectorsRequest.ts | 1 - 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index e813a433b3..2e2ec5e0a2 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -22681,7 +22681,7 @@ "document" ], "summary": "Get multiple term vectors", - "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors", "parameters": [ { @@ -22735,7 +22735,7 @@ "document" ], "summary": "Get multiple term vectors", - "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-1", "parameters": [ { @@ -22791,7 +22791,7 @@ "document" ], "summary": "Get multiple term vectors", - "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-2", "parameters": [ { @@ -22848,7 +22848,7 @@ "document" ], "summary": "Get multiple term vectors", - "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-3", "parameters": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index fd6099f7b1..bb3ed84ff8 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -14010,7 +14010,7 @@ "document" ], "summary": "Get multiple term vectors", - "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors", "parameters": [ { @@ -14064,7 +14064,7 @@ "document" ], "summary": "Get multiple term vectors", - "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-1", "parameters": [ { @@ -14120,7 +14120,7 @@ "document" ], "summary": "Get multiple term vectors", - "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-2", "parameters": [ { @@ -14177,7 +14177,7 @@ "document" ], "summary": "Get multiple term vectors", - "description": "Get multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-3", "parameters": [ { diff --git a/output/schema/schema.json b/output/schema/schema.json index 0ed841f93f..742f2f0fdf 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -12862,7 +12862,7 @@ "stability": "stable" } }, - "description": "Get multiple term vectors.\n\nGet multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", + "description": "Get multiple term vectors.\n\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "docTag": "document", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html", "name": "mtermvectors", @@ -28974,7 +28974,7 @@ } ] }, - "description": "Get multiple term vectors.\n\nGet multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", + "description": "Get multiple term vectors.\n\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "inherits": { "type": { "name": "RequestBase", @@ -29156,7 +29156,7 @@ } } ], - "specLocation": "_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L117" + "specLocation": "_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L116" }, { "kind": "response", diff --git a/specification/_global/mtermvectors/MultiTermVectorsRequest.ts b/specification/_global/mtermvectors/MultiTermVectorsRequest.ts index 86b67b08bc..83a5ba4212 100644 --- a/specification/_global/mtermvectors/MultiTermVectorsRequest.ts +++ b/specification/_global/mtermvectors/MultiTermVectorsRequest.ts @@ -31,7 +31,6 @@ import { Operation } from './types' /** * Get multiple term vectors. * - * Get multiple term vectors with a single request. * You can specify existing documents by index and ID or provide artificial documents in the body of the request. * You can specify the index in the request body or request URI. * The response contains a `docs` array with all the fetched termvectors. From 438d83e6774dd28bce8781aea6b429755b4b74c3 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 22 Oct 2024 18:55:01 -0700 Subject: [PATCH 7/8] [OpenAPI] Edit rethrottle APIs --- docs/overlays/elasticsearch-shared-overlays.yaml | 4 ---- .../DeleteByQueryRethrottleRequest.ts | 5 +++++ .../_global/reindex_rethrottle/ReindexRethrottleRequest.ts | 4 +++- .../UpdateByQueryRethrottleRequest.ts | 5 +++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 7828f99121..077dab496c 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -55,10 +55,6 @@ actions: externalDocs: description: Reading and writing documents url: https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-replication.html - - name: delete_by_query_rethrottle - x-displayName: Document - Rethrottle delete by query - - name: update_by_query_rethrottle - x-displayName: Document - Rethrottle update by query # E - name: enrich x-displayName: Enrich diff --git a/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts b/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts index defc8559cf..22f1cd171c 100644 --- a/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts +++ b/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts @@ -22,9 +22,14 @@ import { TaskId } from '@_types/common' import { float } from '@_types/Numeric' /** + * Throttle a delete by query operation. + * + * Change the number of requests per second for a particular delete by query operation. + * Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. * @rest_spec_name delete_by_query_rethrottle * @availability stack since=6.5.0 stability=stable * @availability serverless stability=stable visibility=private + * @doc_tag document */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/_global/reindex_rethrottle/ReindexRethrottleRequest.ts b/specification/_global/reindex_rethrottle/ReindexRethrottleRequest.ts index e955a60dbc..8a2841b40e 100644 --- a/specification/_global/reindex_rethrottle/ReindexRethrottleRequest.ts +++ b/specification/_global/reindex_rethrottle/ReindexRethrottleRequest.ts @@ -22,7 +22,9 @@ import { Id } from '@_types/common' import { float } from '@_types/Numeric' /** - * Copies documents from a source to a destination. + * Throttle a reindex operation. + * + * Change the number of requests per second for a particular reindex operation. * @rest_spec_name reindex_rethrottle * @availability stack since=2.4.0 stability=stable * @availability serverless stability=stable visibility=private diff --git a/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts b/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts index deddea2a59..abc6810490 100644 --- a/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts +++ b/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts @@ -22,9 +22,14 @@ import { Id } from '@_types/common' import { float } from '@_types/Numeric' /** + * Throttle an update by query operation. + * + * Change the number of requests per second for a particular update by query operation. + * Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. * @rest_spec_name update_by_query_rethrottle * @availability stack since=6.5.0 stability=stable * @availability serverless stability=stable visibility=private + * @doc_tag document */ export interface Request extends RequestBase { path_parts: { From dc9d4c0e49f0a19ec7205a7ffccbf8b651ce52e4 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 22 Oct 2024 18:55:48 -0700 Subject: [PATCH 8/8] Generate output --- output/openapi/elasticsearch-openapi.json | 13 ++++++++----- output/schema/schema.json | 20 +++++++++++--------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 2e2ec5e0a2..341465c7b1 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -6950,9 +6950,10 @@ "/_delete_by_query/{task_id}/_rethrottle": { "post": { "tags": [ - "delete_by_query_rethrottle" + "document" ], - "summary": "Changes the number of requests per second for a particular Delete By Query operation", + "summary": "Throttle a delete by query operation", + "description": "Change the number of requests per second for a particular delete by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", "operationId": "delete-by-query-rethrottle", "parameters": [ { @@ -24508,7 +24509,8 @@ "tags": [ "document" ], - "summary": "Copies documents from a source to a destination", + "summary": "Throttle a reindex operation", + "description": "Change the number of requests per second for a particular reindex operation.", "operationId": "reindex-rethrottle", "parameters": [ { @@ -34864,9 +34866,10 @@ "/_update_by_query/{task_id}/_rethrottle": { "post": { "tags": [ - "update_by_query_rethrottle" + "document" ], - "summary": "Changes the number of requests per second for a particular Update By Query operation", + "summary": "Throttle an update by query operation", + "description": "Change the number of requests per second for a particular update by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", "operationId": "update-by-query-rethrottle", "parameters": [ { diff --git a/output/schema/schema.json b/output/schema/schema.json index 742f2f0fdf..dbbfdfc566 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -4338,7 +4338,8 @@ "stability": "stable" } }, - "description": "Changes the number of requests per second for a particular Delete By Query operation.", + "description": "Throttle a delete by query operation.\n\nChange the number of requests per second for a particular delete by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", + "docTag": "document", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html", "name": "delete_by_query_rethrottle", "request": { @@ -13847,7 +13848,7 @@ "stability": "stable" } }, - "description": "Copies documents from a source to a destination.", + "description": "Throttle a reindex operation.\n\nChange the number of requests per second for a particular reindex operation.", "docTag": "document", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html", "name": "reindex_rethrottle", @@ -19760,7 +19761,8 @@ "stability": "stable" } }, - "description": "Changes the number of requests per second for a particular Update By Query operation.", + "description": "Throttle an update by query operation.\n\nChange the number of requests per second for a particular update by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", + "docTag": "document", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html", "name": "update_by_query_rethrottle", "request": { @@ -22687,7 +22689,7 @@ "body": { "kind": "no_body" }, - "description": "Changes the number of requests per second for a particular Delete By Query operation.", + "description": "Throttle a delete by query operation.\n\nChange the number of requests per second for a particular delete by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", "inherits": { "type": { "name": "RequestBase", @@ -22726,7 +22728,7 @@ } } ], - "specLocation": "_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts#L24-L42" + "specLocation": "_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts#L24-L47" }, { "kind": "response", @@ -31421,7 +31423,7 @@ "body": { "kind": "no_body" }, - "description": "Copies documents from a source to a destination.", + "description": "Throttle a reindex operation.\n\nChange the number of requests per second for a particular reindex operation.", "inherits": { "type": { "name": "RequestBase", @@ -31460,7 +31462,7 @@ } } ], - "specLocation": "_global/reindex_rethrottle/ReindexRethrottleRequest.ts#L24-L44" + "specLocation": "_global/reindex_rethrottle/ReindexRethrottleRequest.ts#L24-L46" }, { "kind": "response", @@ -42110,7 +42112,7 @@ "body": { "kind": "no_body" }, - "description": "Changes the number of requests per second for a particular Update By Query operation.", + "description": "Throttle an update by query operation.\n\nChange the number of requests per second for a particular update by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", "inherits": { "type": { "name": "RequestBase", @@ -42150,7 +42152,7 @@ } } ], - "specLocation": "_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts#L24-L43" + "specLocation": "_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts#L24-L48" }, { "kind": "response",