From 21daa09906a8b3d71d4cc3506b68bf6860eba8d0 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Mon, 7 Jul 2025 09:17:58 -0700 Subject: [PATCH] Add missing create index response example (#4701) (cherry picked from commit 1540fd0cf487d5da85a872a28ffc9a0950c9e9df) --- output/openapi/elasticsearch-openapi.json | 6 ++++++ .../elasticsearch-serverless-openapi.json | 6 ++++++ output/schema/schema.json | 6 ++++++ .../response/CreateResponseExample1.yaml | 18 ++++++++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 specification/_global/create/examples/response/CreateResponseExample1.yaml diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 575faa0c81..4ffea9c32f 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -104923,6 +104923,12 @@ "application/json": { "schema": { "$ref": "#/components/schemas/_types.WriteResponseBase" + }, + "examples": { + "CreateResponseExample1": { + "description": "A successful response from `PUT my-index-000001/_create/1` which indexes a document.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n}" + } } } } diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index a7c19903c0..f3d20223b4 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -63728,6 +63728,12 @@ "application/json": { "schema": { "$ref": "#/components/schemas/_types.WriteResponseBase" + }, + "examples": { + "CreateResponseExample1": { + "description": "A successful response from `PUT my-index-000001/_create/1` which indexes a document.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n}" + } } } } diff --git a/output/schema/schema.json b/output/schema/schema.json index df8e8809af..1e830083a4 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -25891,6 +25891,12 @@ } } }, + "examples": { + "CreateResponseExample1": { + "description": "A successful response from `PUT my-index-000001/_create/1` which indexes a document.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n}" + } + }, "name": { "name": "Response", "namespace": "_global.create" diff --git a/specification/_global/create/examples/response/CreateResponseExample1.yaml b/specification/_global/create/examples/response/CreateResponseExample1.yaml new file mode 100644 index 0000000000..f9fbc1ae40 --- /dev/null +++ b/specification/_global/create/examples/response/CreateResponseExample1.yaml @@ -0,0 +1,18 @@ +# summary: '' +description: A successful response from `PUT my-index-000001/_create/1` which indexes a document. +# type: response +# response_code: 200 +value: |- + { + "_index": "my-index-000001", + "_id": "1", + "_version": 1, + "result": "created", + "_shards": { + "total": 1, + "successful": 1, + "failed": 0 + }, + "_seq_no": 0, + "_primary_term": 1 + }