From 7ff66bc11e4413ef75140ee83e83a04c7044addd Mon Sep 17 00:00:00 2001 From: Mihir Soni Date: Wed, 3 Mar 2021 23:43:40 +0000 Subject: [PATCH 1/2] [Rename] kbn-spec-to-console in packages directory to osd-spec-to-console Signed-off-by: Mihir Soni --- .../{kbn-spec-to-console => osd-spec-to-console}/README.md | 6 +++--- .../bin/spec_to_console.js | 0 .../{kbn-spec-to-console => osd-spec-to-console}/index.js | 0 .../lib/convert.js | 0 .../lib/convert.test.js | 0 .../lib/convert/methods.js | 0 .../lib/convert/params.js | 0 .../lib/convert/parts.js | 0 .../lib/convert/paths.js | 0 .../lib/replace_pattern.js | 0 .../lib/static/map_interpolation.json | 0 .../package.json | 4 ++-- .../test/fixtures/cluster_health_autocomplete.json | 0 .../test/fixtures/cluster_health_spec.json | 0 .../{kbn-spec-to-console => osd-spec-to-console}/yarn.lock | 0 15 files changed, 5 insertions(+), 5 deletions(-) rename packages/{kbn-spec-to-console => osd-spec-to-console}/README.md (88%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/bin/spec_to_console.js (100%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/index.js (100%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/lib/convert.js (100%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/lib/convert.test.js (100%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/lib/convert/methods.js (100%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/lib/convert/params.js (100%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/lib/convert/parts.js (100%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/lib/convert/paths.js (100%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/lib/replace_pattern.js (100%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/lib/static/map_interpolation.json (100%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/package.json (85%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/test/fixtures/cluster_health_autocomplete.json (100%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/test/fixtures/cluster_health_spec.json (100%) rename packages/{kbn-spec-to-console => osd-spec-to-console}/yarn.lock (100%) diff --git a/packages/kbn-spec-to-console/README.md b/packages/osd-spec-to-console/README.md similarity index 88% rename from packages/kbn-spec-to-console/README.md rename to packages/osd-spec-to-console/README.md index fc59bff62417..6ddf0339182a 100644 --- a/packages/kbn-spec-to-console/README.md +++ b/packages/osd-spec-to-console/README.md @@ -1,4 +1,4 @@ -A mini utility to convert [Elasticsearch's REST spec](https://github.com/elastic/elasticsearch/blob/master/rest-api-spec) to Console's (Kibana) autocomplete format. +A mini utility to convert [Elasticsearch's REST spec](https://github.com/elastic/elasticsearch/blob/master/rest-api-spec) to Console's (OpenSearch Dashboards) autocomplete format. It is used to semi-manually update Console's autocompletion rules. @@ -8,7 +8,7 @@ It is used to semi-manually update Console's autocompletion rules. If you don't have a copy of the Elasticsearch repo on your machine, follow these steps to clone only the rest API specs ``` -mkdir es-spec && cd es-spec +mkdir opensearch-spec && cd opensearch-spec git init git remote add origin https://github.com/elastic/elasticsearch git config core.sparsecheckout true @@ -19,7 +19,7 @@ git pull --depth=1 origin master ### Usage You need to run the command twice: once for the **OSS** specs and once for the **X-Pack** specs -At the root of the Kibana repository, run the following commands: +At the root of the OpenSearch Dashboards repository, run the following commands: ```sh # OSS diff --git a/packages/kbn-spec-to-console/bin/spec_to_console.js b/packages/osd-spec-to-console/bin/spec_to_console.js similarity index 100% rename from packages/kbn-spec-to-console/bin/spec_to_console.js rename to packages/osd-spec-to-console/bin/spec_to_console.js diff --git a/packages/kbn-spec-to-console/index.js b/packages/osd-spec-to-console/index.js similarity index 100% rename from packages/kbn-spec-to-console/index.js rename to packages/osd-spec-to-console/index.js diff --git a/packages/kbn-spec-to-console/lib/convert.js b/packages/osd-spec-to-console/lib/convert.js similarity index 100% rename from packages/kbn-spec-to-console/lib/convert.js rename to packages/osd-spec-to-console/lib/convert.js diff --git a/packages/kbn-spec-to-console/lib/convert.test.js b/packages/osd-spec-to-console/lib/convert.test.js similarity index 100% rename from packages/kbn-spec-to-console/lib/convert.test.js rename to packages/osd-spec-to-console/lib/convert.test.js diff --git a/packages/kbn-spec-to-console/lib/convert/methods.js b/packages/osd-spec-to-console/lib/convert/methods.js similarity index 100% rename from packages/kbn-spec-to-console/lib/convert/methods.js rename to packages/osd-spec-to-console/lib/convert/methods.js diff --git a/packages/kbn-spec-to-console/lib/convert/params.js b/packages/osd-spec-to-console/lib/convert/params.js similarity index 100% rename from packages/kbn-spec-to-console/lib/convert/params.js rename to packages/osd-spec-to-console/lib/convert/params.js diff --git a/packages/kbn-spec-to-console/lib/convert/parts.js b/packages/osd-spec-to-console/lib/convert/parts.js similarity index 100% rename from packages/kbn-spec-to-console/lib/convert/parts.js rename to packages/osd-spec-to-console/lib/convert/parts.js diff --git a/packages/kbn-spec-to-console/lib/convert/paths.js b/packages/osd-spec-to-console/lib/convert/paths.js similarity index 100% rename from packages/kbn-spec-to-console/lib/convert/paths.js rename to packages/osd-spec-to-console/lib/convert/paths.js diff --git a/packages/kbn-spec-to-console/lib/replace_pattern.js b/packages/osd-spec-to-console/lib/replace_pattern.js similarity index 100% rename from packages/kbn-spec-to-console/lib/replace_pattern.js rename to packages/osd-spec-to-console/lib/replace_pattern.js diff --git a/packages/kbn-spec-to-console/lib/static/map_interpolation.json b/packages/osd-spec-to-console/lib/static/map_interpolation.json similarity index 100% rename from packages/kbn-spec-to-console/lib/static/map_interpolation.json rename to packages/osd-spec-to-console/lib/static/map_interpolation.json diff --git a/packages/kbn-spec-to-console/package.json b/packages/osd-spec-to-console/package.json similarity index 85% rename from packages/kbn-spec-to-console/package.json rename to packages/osd-spec-to-console/package.json index 9684201c7238..d48793cf0ed5 100644 --- a/packages/kbn-spec-to-console/package.json +++ b/packages/osd-spec-to-console/package.json @@ -1,7 +1,7 @@ { "name": "spec-to-console", "version": "0.0.0", - "description": "ES REST spec -> Console autocomplete", + "description": "OpenSearch REST spec -> Console autocomplete", "main": "index.js", "directories": { "lib": "lib" @@ -12,7 +12,7 @@ }, "author": "", "license": "Apache-2.0", - "kibana": { + "opensearchDashboards": { "devOnly": true }, "bugs": { diff --git a/packages/kbn-spec-to-console/test/fixtures/cluster_health_autocomplete.json b/packages/osd-spec-to-console/test/fixtures/cluster_health_autocomplete.json similarity index 100% rename from packages/kbn-spec-to-console/test/fixtures/cluster_health_autocomplete.json rename to packages/osd-spec-to-console/test/fixtures/cluster_health_autocomplete.json diff --git a/packages/kbn-spec-to-console/test/fixtures/cluster_health_spec.json b/packages/osd-spec-to-console/test/fixtures/cluster_health_spec.json similarity index 100% rename from packages/kbn-spec-to-console/test/fixtures/cluster_health_spec.json rename to packages/osd-spec-to-console/test/fixtures/cluster_health_spec.json diff --git a/packages/kbn-spec-to-console/yarn.lock b/packages/osd-spec-to-console/yarn.lock similarity index 100% rename from packages/kbn-spec-to-console/yarn.lock rename to packages/osd-spec-to-console/yarn.lock From 031faa4574f23af0d482646eb684f4aee4b46581 Mon Sep 17 00:00:00 2001 From: Mihir Soni Date: Thu, 4 Mar 2021 20:45:48 +0000 Subject: [PATCH 2/2] [Rename] in-corporate review comments Signed-off-by: Mihir Soni --- packages/osd-spec-to-console/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/osd-spec-to-console/README.md b/packages/osd-spec-to-console/README.md index 6ddf0339182a..eceb543eddd1 100644 --- a/packages/osd-spec-to-console/README.md +++ b/packages/osd-spec-to-console/README.md @@ -1,11 +1,11 @@ -A mini utility to convert [Elasticsearch's REST spec](https://github.com/elastic/elasticsearch/blob/master/rest-api-spec) to Console's (OpenSearch Dashboards) autocomplete format. +\ mini utility to convert [OpenSearch's REST spec](https://github.com/elastic/elasticsearch/blob/master/rest-api-spec) to Console's (OpenSearch Dashboards) autocomplete format. It is used to semi-manually update Console's autocompletion rules. ### Retrieving the spec -If you don't have a copy of the Elasticsearch repo on your machine, follow these steps to clone only the rest API specs +If you don't have a copy of the OpenSearch repo on your machine, follow these steps to clone only the rest API specs ``` mkdir opensearch-spec && cd opensearch-spec @@ -23,10 +23,10 @@ At the root of the OpenSearch Dashboards repository, run the following commands: ```sh # OSS -yarn spec_to_console -g "/rest-api-spec/src/main/resources/rest-api-spec/api/*" -d "src/plugins/console/server/lib/spec_definitions/json/generated" +yarn spec_to_console -g "/rest-api-spec/src/main/resources/rest-api-spec/api/*" -d "src/plugins/console/server/lib/spec_definitions/json/generated" # X-pack -yarn spec_to_console -g "/x-pack/plugin/src/test/resources/rest-api-spec/api/*" -d "x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated" +yarn spec_to_console -g "/x-pack/plugin/src/test/resources/rest-api-spec/api/*" -d "x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated" ``` ### Information used in Console that is not available in the REST spec