From 7112c575e9c70c2e2c6a9f563aa4872d54c37821 Mon Sep 17 00:00:00 2001 From: Kuruyia Date: Mon, 7 Oct 2024 14:11:07 +0200 Subject: [PATCH 1/5] docs: fixes for VuePress 2 --- .../auth/create-my-credentials/index.md | 1 + .../controllers/auth/credentials-exists/index.md | 1 + .../auth/delete-my-credentials/index.md | 1 + .../api/controllers/auth/get-current-user/index.md | 1 + .../controllers/auth/get-my-credentials/index.md | 1 + doc/2/api/controllers/auth/get-my-rights/index.md | 1 + .../auth/update-my-credentials/index.md | 1 + doc/2/api/controllers/auth/update-self/index.md | 1 + .../auth/validate-my-credentials/index.md | 1 + doc/2/api/controllers/document/m-update/index.md | 1 + doc/2/api/controllers/document/update/index.md | 1 + doc/2/api/controllers/document/upsert/index.md | 1 + doc/2/api/errors/error-codes/core/index.md | 3 ++- .../classes/backend-subscription/add/index.md | 14 +++++++------- .../guides/write-plugins/old-guides/pipes/index.md | 7 ++++--- 15 files changed, 25 insertions(+), 11 deletions(-) diff --git a/doc/2/api/controllers/auth/create-my-credentials/index.md b/doc/2/api/controllers/auth/create-my-credentials/index.md index 9f109a963d..98767ff033 100644 --- a/doc/2/api/controllers/auth/create-my-credentials/index.md +++ b/doc/2/api/controllers/auth/create-my-credentials/index.md @@ -25,6 +25,7 @@ Body: ``` + ```http URL: http://kuzzle:7512/credentials//_me/_create Method: POST diff --git a/doc/2/api/controllers/auth/credentials-exists/index.md b/doc/2/api/controllers/auth/credentials-exists/index.md index 38287d5f3d..3ad51957ec 100644 --- a/doc/2/api/controllers/auth/credentials-exists/index.md +++ b/doc/2/api/controllers/auth/credentials-exists/index.md @@ -24,6 +24,7 @@ Headers: Authorization: "Bearer " ``` + ```http URL: http://kuzzle:7512/credentials//_me/_exists Method: GET diff --git a/doc/2/api/controllers/auth/delete-my-credentials/index.md b/doc/2/api/controllers/auth/delete-my-credentials/index.md index 7f78076851..3557ffec82 100644 --- a/doc/2/api/controllers/auth/delete-my-credentials/index.md +++ b/doc/2/api/controllers/auth/delete-my-credentials/index.md @@ -26,6 +26,7 @@ Headers: Authorization: "Bearer " ``` + ```http URL: http://kuzzle:7512/credentials//_me Method: DELETE diff --git a/doc/2/api/controllers/auth/get-current-user/index.md b/doc/2/api/controllers/auth/get-current-user/index.md index ad604e2e7e..f069d278ae 100644 --- a/doc/2/api/controllers/auth/get-current-user/index.md +++ b/doc/2/api/controllers/auth/get-current-user/index.md @@ -24,6 +24,7 @@ Headers: Authorization: "Bearer " ``` + ```http URL: http://kuzzle:7512/users/_me Method: GET diff --git a/doc/2/api/controllers/auth/get-my-credentials/index.md b/doc/2/api/controllers/auth/get-my-credentials/index.md index cd5e20b2ce..c490c7d4a6 100644 --- a/doc/2/api/controllers/auth/get-my-credentials/index.md +++ b/doc/2/api/controllers/auth/get-my-credentials/index.md @@ -28,6 +28,7 @@ Headers: Authorization: "Bearer " ``` + ```http URL: http://kuzzle:7512/credentials//_me Method: GET diff --git a/doc/2/api/controllers/auth/get-my-rights/index.md b/doc/2/api/controllers/auth/get-my-rights/index.md index 44a7aa6048..fb15c7380b 100644 --- a/doc/2/api/controllers/auth/get-my-rights/index.md +++ b/doc/2/api/controllers/auth/get-my-rights/index.md @@ -24,6 +24,7 @@ Headers: Authorization: "Bearer " ``` + ```http URL: http://kuzzle:7512/users/_me/_rights Method: GET diff --git a/doc/2/api/controllers/auth/update-my-credentials/index.md b/doc/2/api/controllers/auth/update-my-credentials/index.md index 7da7e716d6..916d89192b 100644 --- a/doc/2/api/controllers/auth/update-my-credentials/index.md +++ b/doc/2/api/controllers/auth/update-my-credentials/index.md @@ -25,6 +25,7 @@ Body: ``` + ```http URL: http://kuzzle:7512/credentials//_me/_update Method: PUT diff --git a/doc/2/api/controllers/auth/update-self/index.md b/doc/2/api/controllers/auth/update-self/index.md index 1036e04259..5f54a2faf0 100644 --- a/doc/2/api/controllers/auth/update-self/index.md +++ b/doc/2/api/controllers/auth/update-self/index.md @@ -25,6 +25,7 @@ Body: ``` + ```http URL: http://kuzzle:7512/_updateSelf[?refresh=wait_for][?retryOnConflict=10] Method: PUT diff --git a/doc/2/api/controllers/auth/validate-my-credentials/index.md b/doc/2/api/controllers/auth/validate-my-credentials/index.md index 515bc4b932..e0c15f0015 100644 --- a/doc/2/api/controllers/auth/validate-my-credentials/index.md +++ b/doc/2/api/controllers/auth/validate-my-credentials/index.md @@ -27,6 +27,7 @@ Body: ``` + ```http URL: http://kuzzle:7512/credentials//_me/_validate Method: POST diff --git a/doc/2/api/controllers/document/m-update/index.md b/doc/2/api/controllers/document/m-update/index.md index ffa1fcf3af..73b1e283f9 100644 --- a/doc/2/api/controllers/document/m-update/index.md +++ b/doc/2/api/controllers/document/m-update/index.md @@ -26,6 +26,7 @@ Body: ``` + ```http URL: http://kuzzle:7512///_mUpdate[?refresh=wait_for][&retryOnConflict=][&silent] Method: PUT diff --git a/doc/2/api/controllers/document/update/index.md b/doc/2/api/controllers/document/update/index.md index cc8ec8614d..ea960bbdb9 100644 --- a/doc/2/api/controllers/document/update/index.md +++ b/doc/2/api/controllers/document/update/index.md @@ -22,6 +22,7 @@ Body: ``` + ```http URL: http://kuzzle:7512///<_id>/_update[?refresh=wait_for][&retryOnConflict=][&source][&silent] Method: PUT diff --git a/doc/2/api/controllers/document/upsert/index.md b/doc/2/api/controllers/document/upsert/index.md index 6183083d81..1ee473c43f 100644 --- a/doc/2/api/controllers/document/upsert/index.md +++ b/doc/2/api/controllers/document/upsert/index.md @@ -24,6 +24,7 @@ Body: ``` + ```http URL: http://kuzzle:7512///<_id>/_upsert[?refresh=wait_for][&retryOnConflict=][&source][&silent] Method: PUT diff --git a/doc/2/api/errors/error-codes/core/index.md b/doc/2/api/errors/error-codes/core/index.md index ec58019a7e..2fa342e40b 100644 --- a/doc/2/api/errors/error-codes/core/index.md +++ b/doc/2/api/errors/error-codes/core/index.md @@ -1,7 +1,7 @@ --- code: true type: page -title: "0x00: core | API | Core " +title: "0x00: core | API | Core " description: Error codes definitions --- @@ -66,6 +66,7 @@ description: Error codes definitions ### Subdomain: 0x0004: sandbox + | id / code | class / status | message | description | | --------- | -------------- | --------| ----------- | | core.sandbox.process_already_running
0x00040001
| [InternalError](/core/2/api/errors/error-codes#internalerror)
(500)
| A process is already running for this sandbox | A process is already running for this sandbox | diff --git a/doc/2/framework/classes/backend-subscription/add/index.md b/doc/2/framework/classes/backend-subscription/add/index.md index 635661313e..8a095ec309 100644 --- a/doc/2/framework/classes/backend-subscription/add/index.md +++ b/doc/2/framework/classes/backend-subscription/add/index.md @@ -40,13 +40,13 @@ add(
-| Argument | Type | Description | -| ------------ | --------------------- | ------------------------------------------------------ | -| `connection` |
Connection
  | Connection to register the subscription on             |
-| `index`      | 
string
| Index name | -| `collection` |
string
| Collection name | -| `filters` |
JSONObject
| Subscription filters | -| `options` |
JSONObject
| Subscription options (`volatile`, `scope` and `users`) | +| Argument | Type | Description | +| ------------ | ------------ | ------------------------------------------------------ | +| `connection` | `Connection` | Connection to register the subscription on | +| `index` | `string` | Index name | +| `collection` | `string` | Collection name | +| `filters` | `JSONObject` | Subscription filters | +| `options` | `JSONObject` | Subscription options (`volatile`, `scope` and `users`) | ## Usage diff --git a/doc/2/guides/write-plugins/old-guides/pipes/index.md b/doc/2/guides/write-plugins/old-guides/pipes/index.md index 5b1d6d959d..d43988b955 100644 --- a/doc/2/guides/write-plugins/old-guides/pipes/index.md +++ b/doc/2/guides/write-plugins/old-guides/pipes/index.md @@ -2,7 +2,7 @@ code: false type: page order: 300 -title: Pipes | Old Guides | Write plugins | Guide +title: Pipes | Old Guides | Write plugins | Guide meta: - name: description content: Pipes are functions plugged to events, called synchronously by Kuzzle, and receiving information regarding that event. @@ -24,8 +24,9 @@ Pipes can: - Decide to abort a task. If a pipe throws an error, Kuzzle interrupts the task, and forwards a standardized version of the thrown error to the originating user - Change the received information. Kuzzle will use the updated information upon resuming the task - -Before Kuzzle 2.2.0, if a pipe takes too long to respond, Kuzzle will eventually abort the user request with a [GatewayTimeout](/core/2/api/errors/types) error. + + +Before Kuzzle 2.2.0, if a pipe takes too long to respond, Kuzzle will eventually abort the user request with a [GatewayTimeout](/core/2/api/errors/types) error. Note that while Kuzzle respond early with a Timeout error to users, the pipe task is still continuing. From d996a7e36b6433927e375d07573caa355c9a5bcb Mon Sep 17 00:00:00 2001 From: Kuruyia Date: Mon, 7 Oct 2024 16:22:37 +0200 Subject: [PATCH 2/5] docs: fix error code generation script --- .ci/scripts/check-error-codes-documentation.sh | 2 +- .gitignore | 1 + doc/2/api/errors/error-codes/api/index.md | 2 +- doc/2/api/errors/error-codes/cluster/index.md | 2 +- doc/2/api/errors/error-codes/network/index.md | 2 +- doc/2/api/errors/error-codes/plugin/index.md | 2 +- doc/2/api/errors/error-codes/protocol/index.md | 2 +- doc/2/api/errors/error-codes/security/index.md | 2 +- doc/2/api/errors/error-codes/services/index.md | 2 +- doc/2/api/errors/error-codes/validation/index.md | 2 +- doc/build-error-codes.js | 4 ++-- 11 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.ci/scripts/check-error-codes-documentation.sh b/.ci/scripts/check-error-codes-documentation.sh index 4c6433fb11..6fd9d0eb69 100755 --- a/.ci/scripts/check-error-codes-documentation.sh +++ b/.ci/scripts/check-error-codes-documentation.sh @@ -4,7 +4,7 @@ set -e echo "Checking error codes.." -mkdir codes +mkdir codes || true npm run doc-error-codes -- --output codes for f in doc/2/api/errors/error-codes/* diff --git a/.gitignore b/.gitignore index e7412cac00..a31917a94d 100644 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,7 @@ index-dump/* #doc framework doc/framework frontmatter-errors.json +codes/ #vscode .vscode diff --git a/doc/2/api/errors/error-codes/api/index.md b/doc/2/api/errors/error-codes/api/index.md index 7699d7699d..b4e847a110 100644 --- a/doc/2/api/errors/error-codes/api/index.md +++ b/doc/2/api/errors/error-codes/api/index.md @@ -1,7 +1,7 @@ --- code: true type: page -title: "0x02: api | API | Core " +title: "0x02: api | API | Core " description: Error codes definitions --- diff --git a/doc/2/api/errors/error-codes/cluster/index.md b/doc/2/api/errors/error-codes/cluster/index.md index 5c75dbb519..51b75d1a58 100644 --- a/doc/2/api/errors/error-codes/cluster/index.md +++ b/doc/2/api/errors/error-codes/cluster/index.md @@ -1,7 +1,7 @@ --- code: true type: page -title: "0x08: cluster | API | Core " +title: "0x08: cluster | API | Core " description: Error codes definitions --- diff --git a/doc/2/api/errors/error-codes/network/index.md b/doc/2/api/errors/error-codes/network/index.md index 940bd4a454..256d71a729 100644 --- a/doc/2/api/errors/error-codes/network/index.md +++ b/doc/2/api/errors/error-codes/network/index.md @@ -1,7 +1,7 @@ --- code: true type: page -title: "0x03: network | API | Core " +title: "0x03: network | API | Core " description: Error codes definitions --- diff --git a/doc/2/api/errors/error-codes/plugin/index.md b/doc/2/api/errors/error-codes/plugin/index.md index 9772756cbb..2828b979b0 100644 --- a/doc/2/api/errors/error-codes/plugin/index.md +++ b/doc/2/api/errors/error-codes/plugin/index.md @@ -1,7 +1,7 @@ --- code: true type: page -title: "0x04: plugin | API | Core " +title: "0x04: plugin | API | Core " description: Error codes definitions --- diff --git a/doc/2/api/errors/error-codes/protocol/index.md b/doc/2/api/errors/error-codes/protocol/index.md index 666edb11d1..b2de855d5f 100644 --- a/doc/2/api/errors/error-codes/protocol/index.md +++ b/doc/2/api/errors/error-codes/protocol/index.md @@ -1,7 +1,7 @@ --- code: true type: page -title: "0x06: protocol | API | Core " +title: "0x06: protocol | API | Core " description: Error codes definitions --- diff --git a/doc/2/api/errors/error-codes/security/index.md b/doc/2/api/errors/error-codes/security/index.md index abcf3b23b3..8526299d2c 100644 --- a/doc/2/api/errors/error-codes/security/index.md +++ b/doc/2/api/errors/error-codes/security/index.md @@ -1,7 +1,7 @@ --- code: true type: page -title: "0x07: security | API | Core " +title: "0x07: security | API | Core " description: Error codes definitions --- diff --git a/doc/2/api/errors/error-codes/services/index.md b/doc/2/api/errors/error-codes/services/index.md index 065ca69595..2ab52b14f8 100644 --- a/doc/2/api/errors/error-codes/services/index.md +++ b/doc/2/api/errors/error-codes/services/index.md @@ -1,7 +1,7 @@ --- code: true type: page -title: "0x01: services | API | Core " +title: "0x01: services | API | Core " description: Error codes definitions --- diff --git a/doc/2/api/errors/error-codes/validation/index.md b/doc/2/api/errors/error-codes/validation/index.md index 0a6475a044..74685132ce 100644 --- a/doc/2/api/errors/error-codes/validation/index.md +++ b/doc/2/api/errors/error-codes/validation/index.md @@ -1,7 +1,7 @@ --- code: true type: page -title: "0x05: validation | API | Core " +title: "0x05: validation | API | Core " description: Error codes definitions --- diff --git a/doc/build-error-codes.js b/doc/build-error-codes.js index c677fac0a7..6a427dce65 100644 --- a/doc/build-error-codes.js +++ b/doc/build-error-codes.js @@ -64,7 +64,7 @@ function getHeader (title) { return `--- code: true type: page -title: "${title} | API | Core " +title: "${title} | API | Core " description: Error codes definitions --- @@ -122,7 +122,7 @@ function buildErrorCodes (name) { doc += `\n\n### Subdomain: 0x${buffer.toString('hex', 2)}: ${subname}\n\n`; if (subdomain.deprecated) { - doc += `\n`; + doc += `\n\n`; } doc += '| id / code | class / status | message | description |\n'; From 8238fd651a38bdea9811740ed94e1e8b7772ea5f Mon Sep 17 00:00:00 2001 From: Kuruyia Date: Tue, 8 Oct 2024 09:33:02 +0200 Subject: [PATCH 3/5] docs: update Elasticsearch page sections --- doc/2/guides/elasticsearch/index.md | 4 ++-- .../migrate-project-from-v7-to-v8/index.md | 10 +++++----- doc/2/guides/elasticsearch/v8/index.md | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/2/guides/elasticsearch/index.md b/doc/2/guides/elasticsearch/index.md index b034a88227..408e4188a1 100644 --- a/doc/2/guides/elasticsearch/index.md +++ b/doc/2/guides/elasticsearch/index.md @@ -2,10 +2,10 @@ code: false type: branch order: 400 -title: Develop on Kuzzle | Guide | Core +title: Elasticsearch | Guide | Core meta: - name: description - content: Write custom backend code for Kuzzle + content: Explore how Kuzzle works with Elasticsearch - name: keywords content: Kuzzle, Documentation, kuzzle write pluggins, General purpose backend, opensource, Develop on Kuzzle --- diff --git a/doc/2/guides/elasticsearch/migrate-project-from-v7-to-v8/index.md b/doc/2/guides/elasticsearch/migrate-project-from-v7-to-v8/index.md index 5a2640450f..a1090e1077 100644 --- a/doc/2/guides/elasticsearch/migrate-project-from-v7-to-v8/index.md +++ b/doc/2/guides/elasticsearch/migrate-project-from-v7-to-v8/index.md @@ -2,10 +2,10 @@ code: false type: page order: 50 -title: Elasticsearch 8 | Develop on Kuzzle | Guide | Core +title: Migrate to Elasticsearch 8 | Elasticsearch | Guide | Core meta: - name: description - content: Extend Kuzzle API with controllers and actions + content: Migrate your Kuzzle project from Elasticsearch 7 to Elasticsearch 8 - name: keywords content: Kuzzle, Documentation, kuzzle write pluggins, General purpose backend, iot, backend, opensource, API Controllers --- @@ -26,12 +26,12 @@ The default major version of Elasticsearch will be 7 until the next major versio ## How to setup your project to use Elasticsearch 8 -### Setup Kuzzle to use Elasticsearch 8 +### Setup Kuzzle to use Elasticsearch 8 #### Upgrade the npm package First you need to upgrade you Kuzzle package to version `>= 2.30.0-es8` in the `package.json` file. Then run `npm install` to upgrade the packages for you application. -### Configure Kuzzle +### Configure Kuzzle A new configuration key `majorVersion` has been introduced ine the `storageEngine` section to allow the selection of the Eleasticsearch version you want to support for your project. When not specified, it will be considered to be version 7, specify 8 if you want to switch Kuzzle to support Elasticasearch 8. @@ -53,7 +53,7 @@ You can not set the `majorVersion` key to 8 if you are using a version of Kuzzle ::: :::info -Kuzzle cannot connect to both Elasticsearch 7 and Elasticsearch 8 at the same time. +Kuzzle cannot connect to both Elasticsearch 7 and Elasticsearch 8 at the same time. ::: Once the version is set to 8, Kuzzle will use the Elasticsearch 8 API to communicate with the database. diff --git a/doc/2/guides/elasticsearch/v8/index.md b/doc/2/guides/elasticsearch/v8/index.md index 8f145f518c..0200cd469f 100644 --- a/doc/2/guides/elasticsearch/v8/index.md +++ b/doc/2/guides/elasticsearch/v8/index.md @@ -2,10 +2,10 @@ code: false type: page order: 100 -title: Elasticsearch 8 | Develop on Kuzzle | Guide | Core +title: Elasticsearch 8 | Elasticsearch | Guide | Core meta: - name: description - content: Extend Kuzzle API with controllers and actions + content: Configure Kuzzle to use Elasticsearch 8 - name: keywords content: Kuzzle, Documentation, kuzzle write pluggins, General purpose backend, iot, backend, opensource, API Controllers --- @@ -22,13 +22,13 @@ Kuzzle exposes the [Elasticsearch Query Language](/core/2/guides/main-concepts/q The support of Elasticsearch 8 has been introduced in Kuzzle 2.30.0. -The choice has been made to keep Kuzzle compatible to avoid breaking changes around the support of ES8. +The choice has been made to keep Kuzzle compatible to avoid breaking changes around the support of ES8. We wanted to allow the user to **opt-in** for this feature, so no modification is needed on your behalf if you want to keep using Elasticsearch 7. The default major version of Elasticsearch will be 7 until Kuzzle v3. -The new configuration key to change the version supported is available under: +The new configuration key to change the version supported is available under: ```json { @@ -41,11 +41,11 @@ The new configuration key to change the version supported is available under: ``` :::warning -You can not set the `majorVersion` key to 8 if you are using a version of Kuzzle that does not support it. +You can not set the `majorVersion` key to 8 if you are using a version of Kuzzle that does not support it. ::: :::info -Kuzzle cannot connect to both Elasticsearch 7 and Elasticsearch 8 at the same time. +Kuzzle cannot connect to both Elasticsearch 7 and Elasticsearch 8 at the same time. ::: Once the version is set to 8, Kuzzle will use the Elasticsearch 8 API to communicate with the database. From f73a6d930f95957eb7c56a7c462c4cf071ef92e8 Mon Sep 17 00:00:00 2001 From: Thomas Mauran Date: Tue, 8 Oct 2024 10:32:57 +0200 Subject: [PATCH 4/5] docs: update badges to 2.32.0 --- .../guides/elasticsearch/migrate-project-from-v7-to-v8/index.md | 2 +- doc/2/guides/elasticsearch/v8/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/2/guides/elasticsearch/migrate-project-from-v7-to-v8/index.md b/doc/2/guides/elasticsearch/migrate-project-from-v7-to-v8/index.md index a1090e1077..c586cf31f8 100644 --- a/doc/2/guides/elasticsearch/migrate-project-from-v7-to-v8/index.md +++ b/doc/2/guides/elasticsearch/migrate-project-from-v7-to-v8/index.md @@ -12,7 +12,7 @@ meta: # Migrate a project from Elasticsearch 7 to Elasticsearch 8 - + Kuzzle relies on Elasticsearch as a [NoSQL document store](/core/2/guides/main-concepts/data-storage). diff --git a/doc/2/guides/elasticsearch/v8/index.md b/doc/2/guides/elasticsearch/v8/index.md index 0200cd469f..a1fb49cfa2 100644 --- a/doc/2/guides/elasticsearch/v8/index.md +++ b/doc/2/guides/elasticsearch/v8/index.md @@ -12,7 +12,7 @@ meta: # Elasticsearch 8 - + Kuzzle uses Elasticsearch as a [NoSQL document store](/core/2/guides/main-concepts/data-storage). From 712dd49ccfd4f9a7ec51b64b17d0d7001949956f Mon Sep 17 00:00:00 2001 From: Thomas Mauran Date: Tue, 8 Oct 2024 12:42:21 +0200 Subject: [PATCH 5/5] docs: add badge 2.33.0 on reIndexCollection --- doc/2/api/controllers/collection/update/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/2/api/controllers/collection/update/index.md b/doc/2/api/controllers/collection/update/index.md index 09affd1c26..881758527f 100644 --- a/doc/2/api/controllers/collection/update/index.md +++ b/doc/2/api/controllers/collection/update/index.md @@ -123,6 +123,8 @@ Body: - `mappings`: [collection mappings](/core/2/guides/main-concepts/data-storage#mappings-properties) - `reindexCollection`: boolean, if `true`, the collection will be reindexed after the update + + --- ## Response