From 0ee4a9e6b280b5b3560a310d3c569fd8a5e9860e Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 19 Sep 2024 09:47:07 -0700 Subject: [PATCH] Convert example to yaml --- docs/overlays/elasticsearch-openapi-overlays.yaml | 2 +- specification/nodes/info/nodesInfoResponseExample1.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 specification/nodes/info/nodesInfoResponseExample1.yaml diff --git a/docs/overlays/elasticsearch-openapi-overlays.yaml b/docs/overlays/elasticsearch-openapi-overlays.yaml index 7e9a053ee..64b359732 100644 --- a/docs/overlays/elasticsearch-openapi-overlays.yaml +++ b/docs/overlays/elasticsearch-openapi-overlays.yaml @@ -107,4 +107,4 @@ actions: application/json: examples: nodesInfoResponseExample1: - $ref: "../../specification/nodes/info/nodesInfoResponseExample1.json" \ No newline at end of file + $ref: "../../specification/nodes/info/nodesInfoResponseExample1.yaml" \ No newline at end of file diff --git a/specification/nodes/info/nodesInfoResponseExample1.yaml b/specification/nodes/info/nodesInfoResponseExample1.yaml new file mode 100644 index 000000000..408f338c0 --- /dev/null +++ b/specification/nodes/info/nodesInfoResponseExample1.yaml @@ -0,0 +1,5 @@ +summary: 200 Successful response +description: A successful response when requesting cluster nodes information. +# type: response +# response_code: 200 +value: "{\n \"_nodes\": \"...\",\n \"cluster_name\": \"elasticsearch\",\n \"nodes\": {\n \"USpTGYaBSIKbgSUJR2Z9lg\": {\n \"name\": \"node-0\",\n \"transport_address\": \"192.168.17:9300\",\n \"host\": \"node-0.elastic.co\",\n \"ip\": \"192.168.17\",\n \"version\": \"{version}\",\n \"transport_version\": 100000298,\n \"index_version\": 100000074,\n \"component_versions\": {\n \"ml_config_version\": 100000162,\n \"transform_config_version\": 100000096\n },\n \"build_flavor\": \"default\",\n \"build_type\": \"{build_type}\",\n \"build_hash\": \"587409e\",\n \"roles\": [\n \"master\",\n \"data\",\n \"ingest\"\n ],\n \"attributes\": {},\n \"plugins\": [\n {\n \"name\": \"analysis-icu\",\n \"version\": \"{version}\",\n \"description\": \"The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.\",\n \"classname\": \"org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin\",\n \"has_native_controller\": false\n }\n ],\n \"modules\": [\n {\n \"name\": \"lang-painless\",\n \"version\": \"{version}\",\n \"description\": \"An easy, safe and fast scripting language for Elasticsearch\",\n \"classname\": \"org.elasticsearch.painless.PainlessPlugin\",\n \"has_native_controller\": false\n }\n ]\n }\n }\n}"