From 92d6b93d83dc72c2dfa5ebac869f05ce3356ad8d Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Wed, 23 Oct 2024 08:47:27 -0700 Subject: [PATCH] [OpenAPI] Edit script language and context APIs (#3054) (cherry picked from commit 6cbaff571945826ce68a2f45d31c0fddbef20c05) --- docs/overlays/elasticsearch-shared-overlays.yaml | 4 ---- output/openapi/elasticsearch-openapi.json | 10 ++++++---- output/schema/schema.json | 14 ++++++++------ .../get_script_context/GetScriptContextRequest.ts | 4 ++++ .../GetScriptLanguagesRequest.ts | 4 ++++ 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 885e7ae97a..4df4befa48 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -175,10 +175,6 @@ actions: # S - name: script x-displayName: Script - - name: get_script_context - x-displayName: Script - Get contexts - - name: get_script_languages - x-displayName: Script - Get languages - name: search x-displayName: Search - name: msearch diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index aac893e7f4..056456aaf8 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -9008,9 +9008,10 @@ "/_script_context": { "get": { "tags": [ - "get_script_context" + "script" ], - "summary": "Returns all script contexts", + "summary": "Get script contexts", + "description": "Get a list of supported script contexts and their methods.", "operationId": "get-script-context", "responses": { "200": { @@ -9040,9 +9041,10 @@ "/_script_language": { "get": { "tags": [ - "get_script_languages" + "script" ], - "summary": "Returns available script types, languages and contexts", + "summary": "Get script languages", + "description": "Get a list of available script types, languages, and contexts.", "operationId": "get-script-languages", "responses": { "200": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 66ee64b4f5..c269a09b98 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -5331,7 +5331,8 @@ "stability": "stable" } }, - "description": "Returns all script contexts.", + "description": "Get script contexts.\n\nGet a list of supported script contexts and their methods.", + "docTag": "script", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html", "name": "get_script_context", "request": { @@ -5361,7 +5362,8 @@ "stability": "stable" } }, - "description": "Returns available script types, languages and contexts", + "description": "Get script languages.\n\nGet a list of available script types, languages, and contexts.", + "docTag": "script", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "name": "get_script_languages", "request": { @@ -24628,7 +24630,7 @@ "body": { "kind": "no_body" }, - "description": "Returns all script contexts.", + "description": "Get script contexts.\n\nGet a list of supported script contexts and their methods.", "inherits": { "type": { "name": "RequestBase", @@ -24641,7 +24643,7 @@ }, "path": [], "query": [], - "specLocation": "_global/get_script_context/GetScriptContextRequest.ts#L22-L26" + "specLocation": "_global/get_script_context/GetScriptContextRequest.ts#L22-L30" }, { "kind": "response", @@ -24713,7 +24715,7 @@ "body": { "kind": "no_body" }, - "description": "Returns available script types, languages and contexts", + "description": "Get script languages.\n\nGet a list of available script types, languages, and contexts.", "inherits": { "type": { "name": "RequestBase", @@ -24726,7 +24728,7 @@ }, "path": [], "query": [], - "specLocation": "_global/get_script_languages/GetScriptLanguagesRequest.ts#L22-L26" + "specLocation": "_global/get_script_languages/GetScriptLanguagesRequest.ts#L22-L30" }, { "kind": "response", diff --git a/specification/_global/get_script_context/GetScriptContextRequest.ts b/specification/_global/get_script_context/GetScriptContextRequest.ts index 6ba1361ed4..69df067f0b 100644 --- a/specification/_global/get_script_context/GetScriptContextRequest.ts +++ b/specification/_global/get_script_context/GetScriptContextRequest.ts @@ -20,7 +20,11 @@ import { RequestBase } from '@_types/Base' /** + * Get script contexts. + * + * Get a list of supported script contexts and their methods. * @rest_spec_name get_script_context * @availability stack stability=stable + * @doc_tag script */ export interface Request extends RequestBase {} diff --git a/specification/_global/get_script_languages/GetScriptLanguagesRequest.ts b/specification/_global/get_script_languages/GetScriptLanguagesRequest.ts index 67f459b545..11d3449b4a 100644 --- a/specification/_global/get_script_languages/GetScriptLanguagesRequest.ts +++ b/specification/_global/get_script_languages/GetScriptLanguagesRequest.ts @@ -20,7 +20,11 @@ import { RequestBase } from '@_types/Base' /** + * Get script languages. + * + * Get a list of available script types, languages, and contexts. * @rest_spec_name get_script_languages * @availability stack stability=stable + * @doc_tag script */ export interface Request extends RequestBase {}