diff --git a/.eslintrc.js b/.eslintrc.js index 837e1abfec..1dd164239e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -43,7 +43,7 @@ module.exports = { overrides: [{ files: ['specs/**/*.yml'], rules: { - "automation-custom/description-dot": "error", + "automation-custom/end-with-dot": "error", "automation-custom/single-quote-ref": "error", }, overrides: [ diff --git a/.github/.cache_version b/.github/.cache_version index 772853bd1a..21a050b43e 100644 --- a/.github/.cache_version +++ b/.github/.cache_version @@ -1 +1 @@ -9.2.0.0 +9.2.2 diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 5a43e68126..3213b3a79f 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -15,6 +15,9 @@ inputs: spec: description: The name of the spec to restore, used for client matrix gen. required: false + specPath: + description: The path of the spec to hash + required: false runs: using: composite @@ -45,14 +48,14 @@ runs: # Restore bundled specs from input: used during 'client' generation - name: Restore ${{ inputs.spec }} built spec - if: ${{ inputs.job == 'client' && inputs.spec }} + if: ${{ inputs.job == 'client' && inputs.spec && inputs.specPath }} uses: actions/cache@v3 with: path: ${{ format('specs/bundled/{0}.yml', inputs.spec) }} key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - format('specs/{0}/**', inputs.spec), + format('specs/{0}/**', inputs.specPath), 'specs/common/**' )}} @@ -220,10 +223,11 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/algoliasearch/**', - 'clients/algoliasearch-client-javascript/packages/client-search/**', - 'clients/algoliasearch-client-javascript/packages/client-analytics/**', - 'clients/algoliasearch-client-javascript/packages/client-personalization/**' + 'specs/bundled/search.yml', + 'specs/bundled/analytics.yml', + 'specs/bundled/personalization.yml', + 'templates/javascript/**', + 'generators/src/**' )}} - name: Restore built JavaScript algoliasearch-lite client @@ -234,10 +238,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/algoliasearch-lite/src/**', - 'clients/algoliasearch-client-javascript/packages/algoliasearch-lite/model/**', - 'clients/algoliasearch-client-javascript/packages/algoliasearch-lite/builds/**', - 'clients/algoliasearch-client-javascript/packages/algoliasearch-lite/package.json', 'specs/bundled/algoliasearch-lite.yml', 'templates/javascript/**', 'generators/src/**' @@ -251,10 +251,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-search/src/**', - 'clients/algoliasearch-client-javascript/packages/client-search/model/**', - 'clients/algoliasearch-client-javascript/packages/client-search/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-search/package.json', 'specs/bundled/search.yml', 'templates/javascript/**', 'generators/src/**' @@ -268,10 +264,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/recommend/src/**', - 'clients/algoliasearch-client-javascript/packages/recommend/model/**', - 'clients/algoliasearch-client-javascript/packages/recommend/builds/**', - 'clients/algoliasearch-client-javascript/packages/recommend/package.json', 'specs/bundled/recommend.yml', 'templates/javascript/**', 'generators/src/**' @@ -285,10 +277,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/**', - 'clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/**', - 'clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-query-suggestions/package.json', 'specs/bundled/query-suggestions.yml', 'templates/javascript/**', 'generators/src/**' @@ -302,10 +290,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-personalization/src/**', - 'clients/algoliasearch-client-javascript/packages/client-personalization/model/**', - 'clients/algoliasearch-client-javascript/packages/client-personalization/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-personalization/package.json', 'specs/bundled/personalization.yml', 'templates/javascript/**', 'generators/src/**' @@ -319,10 +303,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-analytics/src/**', - 'clients/algoliasearch-client-javascript/packages/client-analytics/model/**', - 'clients/algoliasearch-client-javascript/packages/client-analytics/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-analytics/package.json', 'specs/bundled/analytics.yml', 'templates/javascript/**', 'generators/src/**' @@ -336,10 +316,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-abtesting/src/**', - 'clients/algoliasearch-client-javascript/packages/client-abtesting/model/**', - 'clients/algoliasearch-client-javascript/packages/client-abtesting/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-abtesting/package.json', 'specs/bundled/abtesting.yml', 'templates/javascript/**', 'generators/src/**' @@ -353,10 +329,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-insights/src/**', - 'clients/algoliasearch-client-javascript/packages/client-insights/model/**', - 'clients/algoliasearch-client-javascript/packages/client-insights/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-insights/package.json', 'specs/bundled/insights.yml', 'templates/javascript/**', 'generators/src/**' @@ -370,10 +342,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-sources/src/**', - 'clients/algoliasearch-client-javascript/packages/client-sources/model/**', - 'clients/algoliasearch-client-javascript/packages/client-sources/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-sources/package.json', 'specs/bundled/sources.yml', 'templates/javascript/**', 'generators/src/**' @@ -387,10 +355,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-predict/src/**', - 'clients/algoliasearch-client-javascript/packages/client-predict/model/**', - 'clients/algoliasearch-client-javascript/packages/client-predict/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-predict/package.json', 'specs/bundled/predict.yml', 'templates/javascript/**', 'generators/src/**' diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 35fd369c38..7d84e384db 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -13,10 +13,6 @@ inputs: runs: using: composite steps: - - name: Read current GitHub Actions cache version - shell: bash - run: echo "CACHE_VERSION=$(< .github/.cache_version)" >> $GITHUB_ENV - - name: Install Node uses: actions/setup-node@v2 with: diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 3cbb0ecb7d..dd16cae1ab 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -172,6 +172,7 @@ jobs: job: client language: javascript spec: ${{ matrix.client.name }} + specPath: ${{ matrix.client.specPath }} cache_hash: ${{ needs.setup.outputs.CACHE_COMMON_HASH }} - name: Cache '${{ matrix.client.name }}' client @@ -182,10 +183,6 @@ jobs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - format('{0}/src/**', matrix.client.path), - format('{0}/model/**', matrix.client.path), - format('{0}/builds/**', matrix.client.path), - format('{0}/package.json', matrix.client.path), format('specs/bundled/{0}.yml', matrix.client.name), 'templates/javascript/**', 'generators/src/**' @@ -334,10 +331,11 @@ jobs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/algoliasearch/**', - 'clients/algoliasearch-client-javascript/packages/client-search/**', - 'clients/algoliasearch-client-javascript/packages/client-analytics/**', - 'clients/algoliasearch-client-javascript/packages/client-personalization/**' + 'specs/bundled/search.yml', + 'specs/bundled/analytics.yml', + 'specs/bundled/personalization.yml', + 'templates/javascript/**', + 'generators/src/**' )}} - name: Build 'algoliasearch' client diff --git a/eslint/package.json b/eslint/package.json index 7797da68b8..cdabc5fe88 100644 --- a/eslint/package.json +++ b/eslint/package.json @@ -7,7 +7,7 @@ "src/**.ts" ], "scripts": { - "build": "tsc", + "build": "rm -rf dist/ && tsc", "test": "jest" }, "devDependencies": { diff --git a/eslint/src/index.ts b/eslint/src/index.ts index b7f30854ba..8a3bdffe4a 100644 --- a/eslint/src/index.ts +++ b/eslint/src/index.ts @@ -1,9 +1,9 @@ -import { descriptionDot } from './rules/descriptionDot'; +import { endWithDot } from './rules/endWithDot'; import { outOfLineEnum } from './rules/outOfLineEnum'; import { singleQuoteRef } from './rules/singleQuoteRef'; const rules = { - 'description-dot': descriptionDot, + 'end-with-dot': endWithDot, 'out-of-line-enum': outOfLineEnum, 'single-quote-ref': singleQuoteRef, }; diff --git a/eslint/src/rules/descriptionDot.ts b/eslint/src/rules/endWithDot.ts similarity index 80% rename from eslint/src/rules/descriptionDot.ts rename to eslint/src/rules/endWithDot.ts index 0fe438c6af..83a7284684 100644 --- a/eslint/src/rules/descriptionDot.ts +++ b/eslint/src/rules/endWithDot.ts @@ -1,15 +1,14 @@ -/* eslint-disable no-console */ import type { Rule } from 'eslint'; import { isBLockScalar, isPairWithKey, isScalar } from '../utils'; -export const descriptionDot: Rule.RuleModule = { +export const endWithDot: Rule.RuleModule = { meta: { docs: { - description: 'description must end with a dot', + description: '`description`, `summary` must end with a dot', }, messages: { - descriptionNoDot: 'description does not end with a dot', + endWithDot: 'content does not end with a dot', }, fixable: 'code', }, @@ -20,12 +19,17 @@ export const descriptionDot: Rule.RuleModule = { return { YAMLPair(node): void { - if (!isPairWithKey(node, 'description')) { + if ( + !isPairWithKey(node, 'description') && + !isPairWithKey(node, 'summary') + ) { return; } + if (!isScalar(node.value)) { return; } + const value = node.value; if ( typeof value.value !== 'string' || @@ -46,7 +50,7 @@ export const descriptionDot: Rule.RuleModule = { } context.report({ node: node as any, - messageId: 'descriptionNoDot', + messageId: 'endWithDot', fix(fixer) { return fixer.insertTextAfterRange( [0, value.range[1] - toTrim], diff --git a/eslint/tests/descriptionDot.test.ts b/eslint/tests/endWithDot.ts similarity index 90% rename from eslint/tests/descriptionDot.test.ts rename to eslint/tests/endWithDot.ts index 9db3323159..a4c0aa77aa 100644 --- a/eslint/tests/descriptionDot.test.ts +++ b/eslint/tests/endWithDot.ts @@ -1,12 +1,12 @@ import { RuleTester } from 'eslint'; -import { descriptionDot } from '../src/rules/descriptionDot'; +import { endWithDot } from '../src/rules/endWithDot'; const ruleTester = new RuleTester({ parser: require.resolve('yaml-eslint-parser'), }); -ruleTester.run('description-dot', descriptionDot, { +ruleTester.run('end-with-dot', endWithDot, { valid: [ ` simple: diff --git a/scripts/buildSpecs.ts b/scripts/buildSpecs.ts index e8ec2a1559..a4bf9f40a0 100644 --- a/scripts/buildSpecs.ts +++ b/scripts/buildSpecs.ts @@ -19,7 +19,15 @@ const ALGOLIASEARCH_LITE_OPERATIONS = [ 'post', ]; -async function propagateTagsToOperations({ +/** + * This function will transform properties in the bundle depending on the context. + * E.g: + * - Check tags definition + * - Add name of the client in tags + * - Remove unecessary punctuation for documentation + * - etc... + */ +async function transformBundle({ bundledPath, withDoc, clientName, @@ -50,16 +58,23 @@ async function propagateTagsToOperations({ // because open-api-generator will use this to determine the name of the client specMethod.tags = [clientName]; - if ( - !withDoc || - !bundledDocSpec || - !bundledDocSpec.paths[pathKey][method].tags - ) { + // Doc special cases + if (!withDoc || !bundledDocSpec) { + continue; + } + + const docMethod = bundledDocSpec.paths[pathKey][method]; + if (docMethod.summary) { + // Remove dot at the end of summary for better sidebar display + docMethod.summary = docMethod.summary.replace(/\.$/gm, ''); + } + + if (!docMethod.tags) { continue; } // Checks that specified tags are well defined at root level - for (const tag of bundledDocSpec.paths[pathKey][method].tags) { + for (const tag of docMethod.tags) { if (tag === clientName || (alias && tag === alias)) { return; } @@ -162,7 +177,7 @@ async function buildLiteSpec({ const liteBundledPath = `specs/bundled/${spec}.${outputFormat}`; await fsp.writeFile(toAbsolutePath(liteBundledPath), yaml.dump(parsed)); - await propagateTagsToOperations({ + await transformBundle({ bundledPath: toAbsolutePath(liteBundledPath), clientName: spec, // Lite does not need documentation because it's just a subset @@ -223,7 +238,7 @@ async function buildSpec( // Add the correct tags to be able to generate the proper client if (!isLite) { - await propagateTagsToOperations({ + await transformBundle({ bundledPath: toAbsolutePath(bundledPath), clientName: spec, withDoc: BUNDLE_WITH_DOC, diff --git a/scripts/ci/createMatrix.ts b/scripts/ci/createMatrix.ts index 74143bd598..69c5dc69df 100644 --- a/scripts/ci/createMatrix.ts +++ b/scripts/ci/createMatrix.ts @@ -20,6 +20,7 @@ type ClientMatrix = BaseMatrix & { api: string; capitalizedName: string; camelizedName: string; + specPath: string; }; type SpecMatrix = BaseMatrix; @@ -66,6 +67,7 @@ async function getClientMatrix({ api: `${clientName}Client`, capitalizedName: clientName, camelizedName: camelize(client), + specPath: client === 'algoliasearch-lite' ? 'search' : client, }); } diff --git a/specs/search/paths/advanced/getLogs.yml b/specs/search/paths/advanced/getLogs.yml index 3ebd2733df..55b6b5f3ad 100644 --- a/specs/search/paths/advanced/getLogs.yml +++ b/specs/search/paths/advanced/getLogs.yml @@ -2,8 +2,8 @@ get: tags: - Advanced operationId: getLogs - description: Return the lastest log entries. - summary: Return the lastest log entries. + description: Return the latest log entries. + summary: Return the latest log entries. parameters: - name: offset in: query diff --git a/specs/search/paths/advanced/getTask.yml b/specs/search/paths/advanced/getTask.yml index 5ae035c037..7a0b038180 100644 --- a/specs/search/paths/advanced/getTask.yml +++ b/specs/search/paths/advanced/getTask.yml @@ -3,7 +3,7 @@ get: - Indices operationId: getTask description: Check the current status of a given task. - summary: Check the current status of a given task. + summary: Check the status of a task. parameters: - $ref: '../../../common/parameters.yml#/IndexName' - name: taskID diff --git a/specs/search/paths/dictionaries/batchDictionaryEntries.yml b/specs/search/paths/dictionaries/batchDictionaryEntries.yml index 166a32512b..02814d06c4 100644 --- a/specs/search/paths/dictionaries/batchDictionaryEntries.yml +++ b/specs/search/paths/dictionaries/batchDictionaryEntries.yml @@ -3,7 +3,7 @@ post: - Dictionnaries operationId: batchDictionaryEntries description: Send a batch of dictionary entries. - summary: Send a batch of dictionary entries. + summary: Batch dictionary entries. parameters: - $ref: 'common/parameters.yml#/DictionaryName' requestBody: diff --git a/specs/search/paths/dictionaries/dictionarySettings.yml b/specs/search/paths/dictionaries/dictionarySettings.yml index 7c04159b4b..516d4f0e4e 100644 --- a/specs/search/paths/dictionaries/dictionarySettings.yml +++ b/specs/search/paths/dictionaries/dictionarySettings.yml @@ -31,8 +31,8 @@ put: tags: - Dictionnaries operationId: setDictionarySettings - description: Set dictionary settings. - summary: Set dictionary settings. + description: Set dictionaries settings. + summary: Set dictionaries settings. requestBody: required: true content: diff --git a/specs/search/paths/dictionaries/getDictionaryLanguages.yml b/specs/search/paths/dictionaries/getDictionaryLanguages.yml index 3f6ab474f2..215569241e 100644 --- a/specs/search/paths/dictionaries/getDictionaryLanguages.yml +++ b/specs/search/paths/dictionaries/getDictionaryLanguages.yml @@ -3,7 +3,7 @@ get: - Dictionnaries operationId: getDictionaryLanguages description: List dictionaries supported per language. - summary: List dictionaries supported per language. + summary: List available languages. responses: '200': description: OK diff --git a/specs/search/paths/dictionaries/searchDictionaryEntries.yml b/specs/search/paths/dictionaries/searchDictionaryEntries.yml index 82b70d08ef..f941d30b8a 100644 --- a/specs/search/paths/dictionaries/searchDictionaryEntries.yml +++ b/specs/search/paths/dictionaries/searchDictionaryEntries.yml @@ -3,7 +3,7 @@ post: - Dictionnaries operationId: searchDictionaryEntries description: Search the dictionary entries. - summary: Search the dictionary entries. + summary: Search a dictionary entries. parameters: - $ref: 'common/parameters.yml#/DictionaryName' requestBody: diff --git a/specs/search/paths/keys/keys.yml b/specs/search/paths/keys/keys.yml index 973f62df9b..4b61fc81a7 100644 --- a/specs/search/paths/keys/keys.yml +++ b/specs/search/paths/keys/keys.yml @@ -2,7 +2,7 @@ get: tags: - Api Keys operationId: listApiKeys - summary: Get the full list of API Keys. + summary: List API Keys. description: List API keys, along with their associated rights. responses: '200': @@ -34,7 +34,7 @@ post: tags: - Api Keys operationId: addApiKey - summary: Create a new API key. + summary: Create an API key. description: Add a new API Key with specific permissions/restrictions. requestBody: required: true diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index 3eaca26d58..5137965c15 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -2,7 +2,7 @@ post: tags: - Clusters operationId: batchAssignUserIds - summary: Batch assign userIDs + summary: Batch assign userIDs. description: > Assign multiple userIDs to a cluster. diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml index bf88a5653a..159fcaf633 100644 --- a/specs/search/paths/multiclusters/getTopUserIds.yml +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -2,7 +2,7 @@ get: tags: - Clusters operationId: getTopUserIds - summary: Get top userID + summary: Get top userID. description: > Get the top 10 userIDs with the highest number of records per cluster. diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml index 68d90d36c4..15f0aae502 100644 --- a/specs/search/paths/multiclusters/hasPendingMappings.yml +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -2,7 +2,7 @@ get: tags: - Clusters operationId: hasPendingMappings - summary: Has pending mappings + summary: Get migration status. description: > Get the status of your clusters' migrations or user creations. diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml index 042e83d6f1..397000faed 100644 --- a/specs/search/paths/multiclusters/listClusters.yml +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -2,7 +2,7 @@ get: tags: - Clusters operationId: listClusters - summary: List clusters + summary: List clusters. description: > List the clusters available in a multi-clusters setup for a single appID. diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 7cef657b0c..565ebe69c8 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -2,7 +2,7 @@ post: tags: - Clusters operationId: searchUserIds - summary: Search userID + summary: Search userID. description: > Search for userIDs. diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index b083acc0b3..bc69af232b 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -2,7 +2,7 @@ get: tags: - Clusters operationId: getUserId - summary: Get userID + summary: Get userID. description: > Returns the userID data stored in the mapping. @@ -31,7 +31,7 @@ delete: tags: - Clusters operationId: removeUserId - summary: Remove userID + summary: Remove userID. description: > Remove a userID and its associated data from the multi-clusters. diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index a6887975c8..144d71a146 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -2,7 +2,7 @@ post: tags: - Clusters operationId: assignUserId - summary: Assign or Move userID + summary: Assign or Move userID. description: > Assign or Move a userID to a cluster. @@ -43,7 +43,7 @@ get: tags: - Clusters operationId: listUserIds - summary: List userIDs + summary: List userIDs. description: > List the userIDs assigned to a multi-clusters appID. diff --git a/specs/search/paths/objects/batch.yml b/specs/search/paths/objects/batch.yml index 4796a744a0..75bb7643b0 100644 --- a/specs/search/paths/objects/batch.yml +++ b/specs/search/paths/objects/batch.yml @@ -2,8 +2,8 @@ post: tags: - Records operationId: batch - description: Performs multiple write operations in a single API call. - summary: Performs multiple write operations in a single API call. + summary: Batch operations to one index. + description: Perform multiple write operations targeting one index, in a single API call. parameters: - $ref: '../../../common/parameters.yml#/IndexName' requestBody: diff --git a/specs/search/paths/objects/multipleBatch.yml b/specs/search/paths/objects/multipleBatch.yml index f3123785b9..e93a854fc2 100644 --- a/specs/search/paths/objects/multipleBatch.yml +++ b/specs/search/paths/objects/multipleBatch.yml @@ -3,7 +3,7 @@ post: - Records operationId: multipleBatch description: Perform multiple write operations, potentially targeting multiple indices, in a single API call. - summary: Perform multiple write operations. + summary: Batch operations to many indices. requestBody: required: true content: diff --git a/specs/search/paths/objects/object.yml b/specs/search/paths/objects/object.yml index fb43fc5a8c..8268ec3043 100644 --- a/specs/search/paths/objects/object.yml +++ b/specs/search/paths/objects/object.yml @@ -2,7 +2,7 @@ get: tags: - Records operationId: getObject - summary: Retrieve one object from the index. + summary: Retrieve an object. description: Retrieve one object from the index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' @@ -38,8 +38,11 @@ put: tags: - Records operationId: addOrUpdateObject - summary: Add or replace an object with a given object ID. - description: Add or replace an object with a given object ID. If the object does not exist, it will be created. If it already exists, it will be replaced. + summary: Add or replace an object. + description: | + Add or replace an object with a given object ID. + If the object does not exist, it will be created. + If it already exists, it will be replaced. parameters: - $ref: '../../../common/parameters.yml#/IndexName' - $ref: '../../../common/parameters.yml#/ObjectID' @@ -66,7 +69,7 @@ delete: tags: - Records operationId: deleteObject - summary: Delete object. + summary: Delete an object. description: Delete an existing object. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/search/multipleQueries.yml b/specs/search/paths/search/multipleQueries.yml index 8d0cc66325..049d504b24 100644 --- a/specs/search/paths/search/multipleQueries.yml +++ b/specs/search/paths/search/multipleQueries.yml @@ -2,8 +2,8 @@ post: tags: - Search operationId: multipleQueries - description: Get search results for the given requests. - summary: Get search results for the given requests. + summary: Search multiple indices. + description: Perform a search operation targeting one or many indices. requestBody: required: true description: The `multipleQueries` requests and strategy. diff --git a/specs/search/paths/search/search.yml b/specs/search/paths/search/search.yml index a308d9f552..977cea7184 100644 --- a/specs/search/paths/search/search.yml +++ b/specs/search/paths/search/search.yml @@ -2,8 +2,8 @@ post: tags: - Search operationId: search - description: Get search results. - summary: Get search results. + summary: Search in an index. + description: Perform a search operation targeting one specific index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' requestBody: diff --git a/specs/search/paths/search/searchForFacetValues.yml b/specs/search/paths/search/searchForFacetValues.yml index 831929c64d..afff2acac7 100644 --- a/specs/search/paths/search/searchForFacetValues.yml +++ b/specs/search/paths/search/searchForFacetValues.yml @@ -2,7 +2,7 @@ post: tags: - Search operationId: searchForFacetValues - summary: Search for values of a given facet + summary: Search for values of a given facet. description: Search for values of a given facet, optionally restricting the returned values to those contained in objects matching other search criteria. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/settings/settings.yml b/specs/search/paths/settings/settings.yml index ad6171f87d..129b900be2 100644 --- a/specs/search/paths/settings/settings.yml +++ b/specs/search/paths/settings/settings.yml @@ -2,8 +2,8 @@ get: tags: - Indices operationId: getSettings - description: Retrieve settings of a given indexName. - summary: Retrieve settings of a given indexName. + description: Retrieve settings of an index. + summary: Retrieve settings of an index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' responses: @@ -26,8 +26,8 @@ put: tags: - Indices operationId: setSettings - description: Update settings of a given indexName. Only specified settings are overridden; unspecified settings are left unchanged. Specifying null for a setting resets it to its default value. - summary: Update settings of a given indexName. + description: Update settings of an index. Only specified settings are overridden; unspecified settings are left unchanged. Specifying null for a setting resets it to its default value. + summary: Update settings of an index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' - $ref: '../../../common/parameters.yml#/ForwardToReplicas' diff --git a/specs/search/paths/synonyms/searchSynonyms.yml b/specs/search/paths/synonyms/searchSynonyms.yml index dc22fe1664..b256cadcda 100644 --- a/specs/search/paths/synonyms/searchSynonyms.yml +++ b/specs/search/paths/synonyms/searchSynonyms.yml @@ -2,7 +2,7 @@ post: tags: - Synonyms operationId: searchSynonyms - summary: Get all synonyms that match a query. + summary: Search synonyms. description: Search or browse all synonyms, optionally filtering them by type. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/spec.yml b/specs/search/spec.yml index bf2efc760d..dea747d475 100644 --- a/specs/search/spec.yml +++ b/specs/search/spec.yml @@ -69,7 +69,7 @@ x-tagGroups: - Rules - Synonyms - Dictionnaries - - name: Other + - name: Others tags: - Api Keys - Clusters diff --git a/website/docs/api-clients/migration-guide.mdx b/website/docs/api-clients/migration-guide.mdx index 97cf3a1609..1e00da8f74 100644 --- a/website/docs/api-clients/migration-guide.mdx +++ b/website/docs/api-clients/migration-guide.mdx @@ -103,7 +103,7 @@ You can continue this guide on [our installation page](/docs/api-clients/install -### Methods targetting an `indexName` +### Methods targeting an `indexName`