From bc263f99cf0c62beabe2fec74e9623d3ba1a1af7 Mon Sep 17 00:00:00 2001 From: Damien Couchez Date: Tue, 23 Nov 2021 16:22:44 +0100 Subject: [PATCH 01/10] feat: add full search client architecture --- README.md | 2 +- openapitools.json | 2 +- package.json | 4 +- .../paths/search_client/advanced/getLogs.yml | 1 + .../paths/search_client/advanced/getTask.yml | 1 + .../paths/search_client/advanced/isAlive.yml | 1 + .../dictionaries/batchDictionaryEntries.yml | 1 + .../dictionaries/getDictionaryLanguages.yml | 1 + .../dictionaries/getDictionarySettings.yml | 1 + .../dictionaries/searchDictionaryEntries.yml | 1 + .../dictionaries/setDictionarySettings.yml | 1 + specs/paths/search_client/keys/addApiKey.yml | 1 + .../paths/search_client/keys/deleteApiKey.yml | 1 + specs/paths/search_client/keys/getApiKey.yml | 1 + .../paths/search_client/keys/listApiKeys.yml | 1 + .../search_client/keys/restoreApiKey.yml | 1 + .../paths/search_client/keys/updateApiKey.yml | 1 + .../manage_indices/copyIndex.yml | 1 + .../manage_indices/deleteIndex.yml | 1 + .../manage_indices/listIndices.yml | 1 + .../multiclusters/assignUserId.yml | 1 + .../multiclusters/batchAssignUserIds.yml | 1 + .../multiclusters/getTopUserIds.yml | 1 + .../search_client/multiclusters/getUserId.yml | 1 + .../multiclusters/hasPendingMappings.yml | 1 + .../multiclusters/listClusters.yml | 1 + .../multiclusters/listUserIds.yml | 1 + .../multiclusters/removeUserId.yml | 1 + .../multiclusters/searchUserIds.yml | 1 + .../objects}/batch.yml | 10 +- .../search_client/objects/clearObjects.yml | 1 + .../paths/search_client/objects/deleteBy.yml | 1 + .../search_client/objects/deleteObject.yml | 1 + .../paths/search_client/objects/getObject.yml | 1 + .../search_client/objects/multipleBatch.yml | 1 + .../objects/multipleGetObjects.yml | 1 + .../search_client/objects/partialUpdate.yml | 1 + .../objects}/saveObject.yml | 10 +- .../search_client/objects/updateObject.yml | 1 + .../paths/search_client/rules/batchRules.yml | 1 + .../paths/search_client/rules/clearRules.yml | 1 + .../paths/search_client/rules/deleteRule.yml | 1 + specs/paths/search_client/rules/getRule.yml | 1 + specs/paths/search_client/rules/saveRule.yml | 1 + .../paths/search_client/rules/searchRules.yml | 1 + specs/paths/search_client/search/browse.yml | 1 + .../search}/multipleQueries.yml | 8 +- .../search}/search.yml | 12 +- .../search/searchForFacetValues.yml | 1 + .../search_client/settings/getSettings.yml | 1 + .../search_client/settings/setSettings.yml | 1 + .../search_client/synonyms/batchSynonyms.yml | 1 + .../synonyms/clearAllSynonyms.yml | 1 + .../search_client/synonyms/deleteSynonym.yml | 1 + .../search_client/synonyms/getSynonym.yml | 1 + .../search_client/synonyms/saveSynonym.yml | 1 + .../search_client/synonyms/searchSynonyms.yml | 1 + .../search_client/vault/appendSource.yml | 1 + .../search_client/vault/deleteSource.yml | 1 + .../paths/search_client/vault/listSources.yml | 1 + .../search_client/vault/replaceSources.yml | 1 + specs/spec.yml | 44 ---- specs/spec_search.yml | 195 ++++++++++++++++++ 63 files changed, 273 insertions(+), 68 deletions(-) create mode 100644 specs/paths/search_client/advanced/getLogs.yml create mode 100644 specs/paths/search_client/advanced/getTask.yml create mode 100644 specs/paths/search_client/advanced/isAlive.yml create mode 100644 specs/paths/search_client/dictionaries/batchDictionaryEntries.yml create mode 100644 specs/paths/search_client/dictionaries/getDictionaryLanguages.yml create mode 100644 specs/paths/search_client/dictionaries/getDictionarySettings.yml create mode 100644 specs/paths/search_client/dictionaries/searchDictionaryEntries.yml create mode 100644 specs/paths/search_client/dictionaries/setDictionarySettings.yml create mode 100644 specs/paths/search_client/keys/addApiKey.yml create mode 100644 specs/paths/search_client/keys/deleteApiKey.yml create mode 100644 specs/paths/search_client/keys/getApiKey.yml create mode 100644 specs/paths/search_client/keys/listApiKeys.yml create mode 100644 specs/paths/search_client/keys/restoreApiKey.yml create mode 100644 specs/paths/search_client/keys/updateApiKey.yml create mode 100644 specs/paths/search_client/manage_indices/copyIndex.yml create mode 100644 specs/paths/search_client/manage_indices/deleteIndex.yml create mode 100644 specs/paths/search_client/manage_indices/listIndices.yml create mode 100644 specs/paths/search_client/multiclusters/assignUserId.yml create mode 100644 specs/paths/search_client/multiclusters/batchAssignUserIds.yml create mode 100644 specs/paths/search_client/multiclusters/getTopUserIds.yml create mode 100644 specs/paths/search_client/multiclusters/getUserId.yml create mode 100644 specs/paths/search_client/multiclusters/hasPendingMappings.yml create mode 100644 specs/paths/search_client/multiclusters/listClusters.yml create mode 100644 specs/paths/search_client/multiclusters/listUserIds.yml create mode 100644 specs/paths/search_client/multiclusters/removeUserId.yml create mode 100644 specs/paths/search_client/multiclusters/searchUserIds.yml rename specs/paths/{indexes => search_client/objects}/batch.yml (84%) create mode 100644 specs/paths/search_client/objects/clearObjects.yml create mode 100644 specs/paths/search_client/objects/deleteBy.yml create mode 100644 specs/paths/search_client/objects/deleteObject.yml create mode 100644 specs/paths/search_client/objects/getObject.yml create mode 100644 specs/paths/search_client/objects/multipleBatch.yml create mode 100644 specs/paths/search_client/objects/multipleGetObjects.yml create mode 100644 specs/paths/search_client/objects/partialUpdate.yml rename specs/paths/{indexes => search_client/objects}/saveObject.yml (71%) create mode 100644 specs/paths/search_client/objects/updateObject.yml create mode 100644 specs/paths/search_client/rules/batchRules.yml create mode 100644 specs/paths/search_client/rules/clearRules.yml create mode 100644 specs/paths/search_client/rules/deleteRule.yml create mode 100644 specs/paths/search_client/rules/getRule.yml create mode 100644 specs/paths/search_client/rules/saveRule.yml create mode 100644 specs/paths/search_client/rules/searchRules.yml create mode 100644 specs/paths/search_client/search/browse.yml rename specs/paths/{indexes => search_client/search}/multipleQueries.yml (86%) rename specs/paths/{indexes => search_client/search}/search.yml (50%) create mode 100644 specs/paths/search_client/search/searchForFacetValues.yml create mode 100644 specs/paths/search_client/settings/getSettings.yml create mode 100644 specs/paths/search_client/settings/setSettings.yml create mode 100644 specs/paths/search_client/synonyms/batchSynonyms.yml create mode 100644 specs/paths/search_client/synonyms/clearAllSynonyms.yml create mode 100644 specs/paths/search_client/synonyms/deleteSynonym.yml create mode 100644 specs/paths/search_client/synonyms/getSynonym.yml create mode 100644 specs/paths/search_client/synonyms/saveSynonym.yml create mode 100644 specs/paths/search_client/synonyms/searchSynonyms.yml create mode 100644 specs/paths/search_client/vault/appendSource.yml create mode 100644 specs/paths/search_client/vault/deleteSource.yml create mode 100644 specs/paths/search_client/vault/listSources.yml create mode 100644 specs/paths/search_client/vault/replaceSources.yml delete mode 100644 specs/spec.yml create mode 100644 specs/spec_search.yml diff --git a/README.md b/README.md index e491854c59..315468114b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ nvm use && yarn ``` -## Generate clients based on the [`spec.yml` file](./specs/spec.yml) +## Generate clients based on the [`spec_search.yml` file](./specs/spec_search.yml) ```bash yarn generate diff --git a/openapitools.json b/openapitools.json index 866cf8a97a..98c9535de1 100644 --- a/openapitools.json +++ b/openapitools.json @@ -9,7 +9,7 @@ "config": "#{cwd}/openapitools.json", "apiPackage": "client-search", "output": "#{cwd}/clients/algoliasearch-client-javascript", - "glob": "specs/spec.yml", + "glob": "specs/spec_search.yml", "gitHost": "algolia", "gitUserId": "algolia", "gitRepoId": "algoliasearch-client-javascript", diff --git a/package.json b/package.json index b5fa07c56e..61a3fb8913 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "playground/javascript/" ], "scripts": { - "build:spec": "yarn swagger-cli bundle specs/spec.yml --outfile dist/openapi.yml --type yaml", - "build:spec:json": "yarn swagger-cli bundle specs/spec.yml --outfile dist/openapi.json --type json", + "build:spec": "yarn swagger-cli bundle specs/spec_search.yml --outfile dist/openapi.yml --type yaml", + "build:spec:json": "yarn swagger-cli bundle specs/spec_search.yml --outfile dist/openapi.json --type json", "clean": "rm -rf **/dist **/build **/node_modules", "client:build-js": "cd clients/algoliasearch-client-javascript/ && yarn install && yarn build && cd ../../", "client:build": "yarn client:build-js", diff --git a/specs/paths/search_client/advanced/getLogs.yml b/specs/paths/search_client/advanced/getLogs.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/advanced/getLogs.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/advanced/getTask.yml b/specs/paths/search_client/advanced/getTask.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/advanced/getTask.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/advanced/isAlive.yml b/specs/paths/search_client/advanced/isAlive.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/advanced/isAlive.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/dictionaries/batchDictionaryEntries.yml b/specs/paths/search_client/dictionaries/batchDictionaryEntries.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/dictionaries/batchDictionaryEntries.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/dictionaries/getDictionaryLanguages.yml b/specs/paths/search_client/dictionaries/getDictionaryLanguages.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/dictionaries/getDictionaryLanguages.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/dictionaries/getDictionarySettings.yml b/specs/paths/search_client/dictionaries/getDictionarySettings.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/dictionaries/getDictionarySettings.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/dictionaries/searchDictionaryEntries.yml b/specs/paths/search_client/dictionaries/searchDictionaryEntries.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/dictionaries/searchDictionaryEntries.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/dictionaries/setDictionarySettings.yml b/specs/paths/search_client/dictionaries/setDictionarySettings.yml new file mode 100644 index 0000000000..3df014f84e --- /dev/null +++ b/specs/paths/search_client/dictionaries/setDictionarySettings.yml @@ -0,0 +1 @@ +put: diff --git a/specs/paths/search_client/keys/addApiKey.yml b/specs/paths/search_client/keys/addApiKey.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/keys/addApiKey.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/keys/deleteApiKey.yml b/specs/paths/search_client/keys/deleteApiKey.yml new file mode 100644 index 0000000000..ac5790e8f8 --- /dev/null +++ b/specs/paths/search_client/keys/deleteApiKey.yml @@ -0,0 +1 @@ +delete: diff --git a/specs/paths/search_client/keys/getApiKey.yml b/specs/paths/search_client/keys/getApiKey.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/keys/getApiKey.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/keys/listApiKeys.yml b/specs/paths/search_client/keys/listApiKeys.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/keys/listApiKeys.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/keys/restoreApiKey.yml b/specs/paths/search_client/keys/restoreApiKey.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/keys/restoreApiKey.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/keys/updateApiKey.yml b/specs/paths/search_client/keys/updateApiKey.yml new file mode 100644 index 0000000000..3df014f84e --- /dev/null +++ b/specs/paths/search_client/keys/updateApiKey.yml @@ -0,0 +1 @@ +put: diff --git a/specs/paths/search_client/manage_indices/copyIndex.yml b/specs/paths/search_client/manage_indices/copyIndex.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/manage_indices/copyIndex.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/manage_indices/deleteIndex.yml b/specs/paths/search_client/manage_indices/deleteIndex.yml new file mode 100644 index 0000000000..ac5790e8f8 --- /dev/null +++ b/specs/paths/search_client/manage_indices/deleteIndex.yml @@ -0,0 +1 @@ +delete: diff --git a/specs/paths/search_client/manage_indices/listIndices.yml b/specs/paths/search_client/manage_indices/listIndices.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/manage_indices/listIndices.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/multiclusters/assignUserId.yml b/specs/paths/search_client/multiclusters/assignUserId.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/multiclusters/assignUserId.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/multiclusters/batchAssignUserIds.yml b/specs/paths/search_client/multiclusters/batchAssignUserIds.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/multiclusters/batchAssignUserIds.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/multiclusters/getTopUserIds.yml b/specs/paths/search_client/multiclusters/getTopUserIds.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/multiclusters/getTopUserIds.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/multiclusters/getUserId.yml b/specs/paths/search_client/multiclusters/getUserId.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/multiclusters/getUserId.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/multiclusters/hasPendingMappings.yml b/specs/paths/search_client/multiclusters/hasPendingMappings.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/multiclusters/hasPendingMappings.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/multiclusters/listClusters.yml b/specs/paths/search_client/multiclusters/listClusters.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/multiclusters/listClusters.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/multiclusters/listUserIds.yml b/specs/paths/search_client/multiclusters/listUserIds.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/multiclusters/listUserIds.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/multiclusters/removeUserId.yml b/specs/paths/search_client/multiclusters/removeUserId.yml new file mode 100644 index 0000000000..ac5790e8f8 --- /dev/null +++ b/specs/paths/search_client/multiclusters/removeUserId.yml @@ -0,0 +1 @@ +delete: diff --git a/specs/paths/search_client/multiclusters/searchUserIds.yml b/specs/paths/search_client/multiclusters/searchUserIds.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/multiclusters/searchUserIds.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/indexes/batch.yml b/specs/paths/search_client/objects/batch.yml similarity index 84% rename from specs/paths/indexes/batch.yml rename to specs/paths/search_client/objects/batch.yml index 7cc4ca405b..5f643a8296 100644 --- a/specs/paths/indexes/batch.yml +++ b/specs/paths/search_client/objects/batch.yml @@ -4,7 +4,7 @@ post: operationId: batch summary: Performs multiple write operations in a single API call parameters: - - $ref: '../../parameters.yml#/IndexName' + - $ref: '../../../parameters.yml#/IndexName' requestBody: required: true content: @@ -48,10 +48,10 @@ post: additionalProperties: false properties: taskID: - $ref: '../../responses/common.yml#/taskID' + $ref: '../../../responses/common.yml#/taskID' objectIDs: - $ref: '../../responses/common.yml#/objectIDs' + $ref: '../../../responses/common.yml#/objectIDs' '400': - $ref: '../../responses/BadRequest.yml' + $ref: '../../../responses/BadRequest.yml' '404': - $ref: '../../responses/IndexNotFound.yml' + $ref: '../../../responses/IndexNotFound.yml' diff --git a/specs/paths/search_client/objects/clearObjects.yml b/specs/paths/search_client/objects/clearObjects.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/objects/clearObjects.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/objects/deleteBy.yml b/specs/paths/search_client/objects/deleteBy.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/objects/deleteBy.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/objects/deleteObject.yml b/specs/paths/search_client/objects/deleteObject.yml new file mode 100644 index 0000000000..ac5790e8f8 --- /dev/null +++ b/specs/paths/search_client/objects/deleteObject.yml @@ -0,0 +1 @@ +delete: diff --git a/specs/paths/search_client/objects/getObject.yml b/specs/paths/search_client/objects/getObject.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/objects/getObject.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/objects/multipleBatch.yml b/specs/paths/search_client/objects/multipleBatch.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/objects/multipleBatch.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/objects/multipleGetObjects.yml b/specs/paths/search_client/objects/multipleGetObjects.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/objects/multipleGetObjects.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/objects/partialUpdate.yml b/specs/paths/search_client/objects/partialUpdate.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/objects/partialUpdate.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/indexes/saveObject.yml b/specs/paths/search_client/objects/saveObject.yml similarity index 71% rename from specs/paths/indexes/saveObject.yml rename to specs/paths/search_client/objects/saveObject.yml index 947ef11dc6..9906f540c6 100644 --- a/specs/paths/indexes/saveObject.yml +++ b/specs/paths/search_client/objects/saveObject.yml @@ -5,7 +5,7 @@ post: summary: Save object description: Add an object to the index, automatically assigning it an object ID parameters: - - $ref: '../../parameters.yml#/IndexName' + - $ref: '../../../parameters.yml#/IndexName' requestBody: required: true content: @@ -26,10 +26,10 @@ post: createdAt: type: string taskID: - $ref: '../../responses/common.yml#/taskID' + $ref: '../../../responses/common.yml#/taskID' objectID: - $ref: '../../responses/common.yml#/objectID' + $ref: '../../../responses/common.yml#/objectID' '400': - $ref: '../../responses/BadRequest.yml' + $ref: '../../../responses/BadRequest.yml' '404': - $ref: '../../responses/IndexNotFound.yml' + $ref: '../../../responses/IndexNotFound.yml' diff --git a/specs/paths/search_client/objects/updateObject.yml b/specs/paths/search_client/objects/updateObject.yml new file mode 100644 index 0000000000..3df014f84e --- /dev/null +++ b/specs/paths/search_client/objects/updateObject.yml @@ -0,0 +1 @@ +put: diff --git a/specs/paths/search_client/rules/batchRules.yml b/specs/paths/search_client/rules/batchRules.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/rules/batchRules.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/rules/clearRules.yml b/specs/paths/search_client/rules/clearRules.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/rules/clearRules.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/rules/deleteRule.yml b/specs/paths/search_client/rules/deleteRule.yml new file mode 100644 index 0000000000..ac5790e8f8 --- /dev/null +++ b/specs/paths/search_client/rules/deleteRule.yml @@ -0,0 +1 @@ +delete: diff --git a/specs/paths/search_client/rules/getRule.yml b/specs/paths/search_client/rules/getRule.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/rules/getRule.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/rules/saveRule.yml b/specs/paths/search_client/rules/saveRule.yml new file mode 100644 index 0000000000..3df014f84e --- /dev/null +++ b/specs/paths/search_client/rules/saveRule.yml @@ -0,0 +1 @@ +put: diff --git a/specs/paths/search_client/rules/searchRules.yml b/specs/paths/search_client/rules/searchRules.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/rules/searchRules.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/search/browse.yml b/specs/paths/search_client/search/browse.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/search/browse.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/indexes/multipleQueries.yml b/specs/paths/search_client/search/multipleQueries.yml similarity index 86% rename from specs/paths/indexes/multipleQueries.yml rename to specs/paths/search_client/search/multipleQueries.yml index 5f0749b37c..6f9902bec2 100644 --- a/specs/paths/indexes/multipleQueries.yml +++ b/specs/paths/search_client/search/multipleQueries.yml @@ -24,7 +24,7 @@ post: example: products description: The Algolia index name query: - $ref: ../../schemas/SearchParams.yml#/searchParams/properties/query + $ref: ../../../schemas/SearchParams.yml#/searchParams/properties/query type: type: string enum: [default, facet] @@ -56,8 +56,8 @@ post: results: type: array items: - $ref: ../../schemas/SearchResponse.yml#/searchResponse + $ref: ../../../schemas/SearchResponse.yml#/searchResponse '400': - $ref: ../../responses/BadRequest.yml + $ref: ../../../responses/BadRequest.yml '404': - $ref: ../../responses/IndexNotFound.yml + $ref: ../../../responses/IndexNotFound.yml diff --git a/specs/paths/indexes/search.yml b/specs/paths/search_client/search/search.yml similarity index 50% rename from specs/paths/indexes/search.yml rename to specs/paths/search_client/search/search.yml index 0b6d615b31..cba2f916d1 100644 --- a/specs/paths/indexes/search.yml +++ b/specs/paths/search_client/search/search.yml @@ -4,15 +4,15 @@ post: operationId: search summary: Get search results parameters: - - $ref: '../../parameters.yml#/IndexName' + - $ref: '../../../parameters.yml#/IndexName' requestBody: required: true content: application/json: schema: oneOf: - - $ref: ../../schemas/SearchParams.yml#/searchParams - - $ref: ../../schemas/SearchParams.yml#/searchParamsString + - $ref: ../../../schemas/SearchParams.yml#/searchParams + - $ref: ../../../schemas/SearchParams.yml#/searchParamsString responses: '200': description: OK @@ -20,8 +20,8 @@ post: application/json: schema: title: singleQueryResponse - $ref: ../../schemas/SearchResponse.yml#/searchResponse + $ref: ../../../schemas/SearchResponse.yml#/searchResponse '400': - $ref: ../../responses/BadRequest.yml + $ref: ../../../responses/BadRequest.yml '404': - $ref: ../../responses/IndexNotFound.yml + $ref: ../../../responses/IndexNotFound.yml diff --git a/specs/paths/search_client/search/searchForFacetValues.yml b/specs/paths/search_client/search/searchForFacetValues.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/search/searchForFacetValues.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/settings/getSettings.yml b/specs/paths/search_client/settings/getSettings.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/settings/getSettings.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/settings/setSettings.yml b/specs/paths/search_client/settings/setSettings.yml new file mode 100644 index 0000000000..3df014f84e --- /dev/null +++ b/specs/paths/search_client/settings/setSettings.yml @@ -0,0 +1 @@ +put: diff --git a/specs/paths/search_client/synonyms/batchSynonyms.yml b/specs/paths/search_client/synonyms/batchSynonyms.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/synonyms/batchSynonyms.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/synonyms/clearAllSynonyms.yml b/specs/paths/search_client/synonyms/clearAllSynonyms.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/synonyms/clearAllSynonyms.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/synonyms/deleteSynonym.yml b/specs/paths/search_client/synonyms/deleteSynonym.yml new file mode 100644 index 0000000000..ac5790e8f8 --- /dev/null +++ b/specs/paths/search_client/synonyms/deleteSynonym.yml @@ -0,0 +1 @@ +delete: diff --git a/specs/paths/search_client/synonyms/getSynonym.yml b/specs/paths/search_client/synonyms/getSynonym.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/synonyms/getSynonym.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/synonyms/saveSynonym.yml b/specs/paths/search_client/synonyms/saveSynonym.yml new file mode 100644 index 0000000000..3df014f84e --- /dev/null +++ b/specs/paths/search_client/synonyms/saveSynonym.yml @@ -0,0 +1 @@ +put: diff --git a/specs/paths/search_client/synonyms/searchSynonyms.yml b/specs/paths/search_client/synonyms/searchSynonyms.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/synonyms/searchSynonyms.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/vault/appendSource.yml b/specs/paths/search_client/vault/appendSource.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/search_client/vault/appendSource.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/search_client/vault/deleteSource.yml b/specs/paths/search_client/vault/deleteSource.yml new file mode 100644 index 0000000000..ac5790e8f8 --- /dev/null +++ b/specs/paths/search_client/vault/deleteSource.yml @@ -0,0 +1 @@ +delete: diff --git a/specs/paths/search_client/vault/listSources.yml b/specs/paths/search_client/vault/listSources.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/search_client/vault/listSources.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/search_client/vault/replaceSources.yml b/specs/paths/search_client/vault/replaceSources.yml new file mode 100644 index 0000000000..3df014f84e --- /dev/null +++ b/specs/paths/search_client/vault/replaceSources.yml @@ -0,0 +1 @@ +put: diff --git a/specs/spec.yml b/specs/spec.yml deleted file mode 100644 index 5d669fc958..0000000000 --- a/specs/spec.yml +++ /dev/null @@ -1,44 +0,0 @@ -openapi: 3.0.2 -info: - title: Search API - description: API powering the Search feature of Algolia. - version: 0.1.0 -servers: - - url: https://{appId}-1.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-2.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-3.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-dsn.algolianet.com - variables: - appId: - default: test -components: - securitySchemes: - appId: - type: apiKey - in: header - name: X-Algolia-Application-Id - apiKey: - type: apiKey - in: header - name: X-Algolia-API-Key -security: - - appId: [] - apiKey: [] -paths: - /1/indexes/{indexName}/query: - $ref: './paths/indexes/search.yml' - /1/indexes/*/queries: - $ref: './paths/indexes/multipleQueries.yml' - /1/indexes/{indexName}: - $ref: './paths/indexes/saveObject.yml' - /1/indexes/{indexName}/batch: - $ref: './paths/indexes/batch.yml' diff --git a/specs/spec_search.yml b/specs/spec_search.yml new file mode 100644 index 0000000000..53658c23a6 --- /dev/null +++ b/specs/spec_search.yml @@ -0,0 +1,195 @@ +openapi: 3.0.2 +info: + title: Search API + description: API powering the Search feature of Algolia. + version: 0.1.0 +servers: + - url: https://{appId}-1.algolianet.com + variables: + appId: + default: test* + - url: https://{appId}-2.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-3.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-dsn.algolianet.com + variables: + appId: + default: test +components: + securitySchemes: + appId: + type: apiKey + in: header + name: X-Algolia-Application-Id + apiKey: + type: apiKey + in: header + name: X-Algolia-API-Key +security: + - appId: [] + apiKey: [] +paths: + # ######################## + # ### Search Endpoints ### + # ######################## + /1/indexes/{indexName}/query: + $ref: './paths/search_client/search/search.yml' + /1/indexes/*/queries: + $ref: './paths/search_client/search/multipleQueries.yml' + #/1/indexes/{indexName}/facets/{facetName}/query: + # $ref: './paths/search_client/search/searchForFacetValues.yml' + #/1/indexes/{indexName}/browse: + # $ref: './paths/search_client/search/browse.yml' + # + # ######################### + # ### Objects Endpoints ### + # ######################### + /1/indexes/{indexName}: + $ref: './paths/search_client/objects/saveObject.yml' + # /1/indexes/{indexName}/{objectID}: + # $ref: './paths/search_client/objects/updateObject.yml' + # /1/indexes/{indexName}/{objectID}: + # $ref: './paths/search_client/objects/deleteObject.yml' + # /1/indexes/{indexName}/deleteByQuery: + # $ref: './paths/search_client/objects/deleteBy.yml' + # /1/indexes/{indexName}/clear: + # $ref: './paths/search_client/objects/clearObjects.yml' + # /1/indexes/{indexName}/{objectID}/partial: + # $ref: './paths/search_client/objects/partialUpdate.yml' + /1/indexes/{indexName}/batch: + $ref: './paths/search_client/objects/batch.yml' + # /1/indexes/*/batch: + # $ref: './paths/search_client/objects/multipleBatch.yml' + # /1/indexes/*/objects: + # $ref: './paths/search_client/objects/multipleGetObjects.yml' + # /1/indexes/{indexName}/{objectID}: + # $ref: './paths/search_client/objects/getObject.yml' + # + # ########################## + # ### Settings Endpoints ### + # ########################## + # /1/indexes/{indexName}/settings: + # $ref: './paths/search_client/settings/getSettings.yml' + # /1/indexes/{indexName}/settings: + # $ref: './paths/search_client/settings/setSettings.yml' + # + # ################################ + # ### Manage Indices Endpoints ### + # ################################ + # /1/indexes/{indexName}: + # $ref: './paths/search_client/manage_indices/deleteIndex.yml' + # /1/indexes/{indexName}/operation: + # $ref: './paths/search_client/manage_indices/copyIndex.yml' + # /1/indexes: + # $ref: './paths/search_client/manage_indices/listIndices.yml' + # + # ########################## + # ### Synonyms Endpoints ### + # ########################## + # /1/indexes/{indexName}/synonyms/{objectID}: + # $ref: './paths/search_client/synonyms/saveSynonym.yml' + # /1/indexes/{indexName}/synonyms/batch: + # $ref: './paths/search_client/synonyms/batchSynonyms.yml' + # /1/indexes/{indexName}/synonyms/{objectID}: + # $ref: './paths/search_client/synonyms/getSynonym.yml' + # /1/indexes/{indexName}/synonyms/clear: + # $ref: './paths/search_client/synonyms/clearAllSynonyms.yml' + # /1/indexes/{indexName}/synonyms/{objectID}: + # $ref: './paths/search_client/synonyms/deleteSynonym.yml' + # /1/indexes/{indexName}/synonyms/search: + # $ref: './paths/search_client/synonyms/searchSynonyms.yml' + # + # ###################### + # ### Keys Endpoints ### + # ###################### + # /1/keys: + # $ref: './paths/search_client/keys/addApiKey.yml' + # /1/keys/{key}: + # $ref: './paths/search_client/keys/updateApiKey.yml' + # /1/keys: + # $ref: './paths/search_client/keys/listApiKeys.yml' + # /1/keys/{key}: + # $ref: './paths/search_client/keys/getApiKey.yml' + # /1/keys/{key}: + # $ref: './paths/search_client/keys/deleteApiKey.yml' + # /1/keys/{key}/restore: + # $ref: './paths/search_client/keys/restoreApiKey.yml' + # + # ####################### + # ### Rules Endpoints ### + # ####################### + # /1/indexes/{indexName}/rules/{objectID}: + # $ref: './paths/search_client/rules/saveRule.yml' + # /1/indexes/{indexName}/rules/batch: + # $ref: './paths/search_client/rules/batchRules.yml' + # /1/indexes/{indexName}/rules/{objectID}: + # $ref: './paths/search_client/rules/getRule.yml' + # /1/indexes/{indexName}/rules/{objectID}: + # $ref: './paths/search_client/rules/deleteRule.yml' + # /1/indexes/{indexName}/rules/clear: + # $ref: './paths/search_client/rules/clearRules.yml' + # /1/indexes/{indexName}/rules/search: + # $ref: './paths/search_client/rules/searchRules.yml' + # + # ############################## + # ### Dictionaries Endpoints ### + # ############################## + # /1/dictionaries/{dictionaryName}/batch: + # $ref: './paths/search_client/dictionaries/batchDictionaryEntries.yml' + # /1/dictionaries/{dictionaryName}/search: + # $ref: './paths/search_client/dictionaries/searchDictionaryEntries.yml' + # /1/dictionaries/*/settings: + # $ref: './paths/search_client/dictionaries/setDictionarySettings.yml' + # /1/dictionaries/*/settings: + # $ref: './paths/search_client/dictionaries/getDictionarySettings.yml' + # /1/dictionaries/*/languages: + # $ref: './paths/search_client/dictionaries/getDictionaryLanguages.yml' + # + # ############################### + # ### MultiClusters Endpoints ### + # ############################### + # /1/clusters/mapping: + # $ref: './paths/search_client/multiclusters/assignUserId.yml' + # /1/clusters/mapping/batch: + # $ref: './paths/search_client/multiclusters/batchAssignUserIds.yml' + # /1/clusters/mapping/top: + # $ref: './paths/search_client/multiclusters/getTopUserIds.yml' + # /1/clusters/mapping/${userID}: + # $ref: './paths/search_client/multiclusters/getUserId.yml' + # /1/clusters: + # $ref: './paths/search_client/multiclusters/listClusters.yml' + # /1/clusters/mapping: + # $ref: './paths/search_client/multiclusters/listUserIds.yml' + # /1/clusters/mapping/${userID}: + # $ref: './paths/search_client/multiclusters/removeUserId.yml' + # /1/clusters/mapping/search: + # $ref: './paths/search_client/multiclusters/searchUserIds.yml' + # /1/clusters/mapping/pending: + # $ref: './paths/search_client/multiclusters/hasPendingMappings.yml' + # + # ####################### + # ### Vault Endpoints ### + # ####################### + # /1/security/sources: + # $ref: './paths/search_client/vault/listSources.yml' + # /1/security/sources: + # $ref: './paths/search_client/vault/replaceSources.yml' + # /1/security/sources/append: + # $ref: './paths/search_client/vault/appendSource.yml' + # /1/security/sources/{source}: + # $ref: './paths/search_client/vault/deleteSource.yml' + # + # ########################## + # ### Advanced Endpoints ### + # ########################## + # /1/logs: + # $ref: './paths/search_client/advanced/getLogs.yml' + # /1/indexes/{indexName}/task/{taskID}: + # $ref: './paths/search_client/advanced/getTask.yml' + # /1/isalive: + # $ref: './paths/search_client/advanced/isAlive.yml' From 11d23ea8e3d158b66717c41def342b1a2ce071c8 Mon Sep 17 00:00:00 2001 From: Damien Couchez Date: Tue, 23 Nov 2021 16:52:57 +0100 Subject: [PATCH 02/10] feat: add abtesting, perso, qs and recommend clients --- specs/paths/abtesting_client/addAbTest.yml | 1 + specs/paths/abtesting_client/deleteAbTest.yml | 1 + specs/paths/abtesting_client/getAbTest.yml | 1 + specs/paths/abtesting_client/listAbTests.yml | 1 + specs/paths/abtesting_client/stopAbTest.yml | 1 + .../deleteUserProfile.yml | 1 + .../getPersonalizationStrategy.yml | 1 + .../getUserTokenProfile.yml | 1 + .../setPersonalizationStrategy.yml | 1 + .../createConfiguration.yml | 1 + .../deleteConfiguration.yml | 1 + .../getAllConfigurations.yml | 1 + .../getConfiguration.yml | 1 + .../getConfigurationStatus.yml | 1 + .../query_suggestions_client/getLogFile.yml | 1 + .../updateConfiguration.yml | 1 + .../recommend_client/getRecommendations.yml | 1 + specs/spec_abtesting.yml | 46 +++++++++++++++++ specs/spec_personalization.yml | 44 ++++++++++++++++ specs/spec_query_suggestions.yml | 50 +++++++++++++++++++ specs/spec_recommend.yml | 38 ++++++++++++++ specs/spec_search.yml | 2 +- 22 files changed, 196 insertions(+), 1 deletion(-) create mode 100644 specs/paths/abtesting_client/addAbTest.yml create mode 100644 specs/paths/abtesting_client/deleteAbTest.yml create mode 100644 specs/paths/abtesting_client/getAbTest.yml create mode 100644 specs/paths/abtesting_client/listAbTests.yml create mode 100644 specs/paths/abtesting_client/stopAbTest.yml create mode 100644 specs/paths/personalization_client/deleteUserProfile.yml create mode 100644 specs/paths/personalization_client/getPersonalizationStrategy.yml create mode 100644 specs/paths/personalization_client/getUserTokenProfile.yml create mode 100644 specs/paths/personalization_client/setPersonalizationStrategy.yml create mode 100644 specs/paths/query_suggestions_client/createConfiguration.yml create mode 100644 specs/paths/query_suggestions_client/deleteConfiguration.yml create mode 100644 specs/paths/query_suggestions_client/getAllConfigurations.yml create mode 100644 specs/paths/query_suggestions_client/getConfiguration.yml create mode 100644 specs/paths/query_suggestions_client/getConfigurationStatus.yml create mode 100644 specs/paths/query_suggestions_client/getLogFile.yml create mode 100644 specs/paths/query_suggestions_client/updateConfiguration.yml create mode 100644 specs/paths/recommend_client/getRecommendations.yml create mode 100644 specs/spec_abtesting.yml create mode 100644 specs/spec_personalization.yml create mode 100644 specs/spec_query_suggestions.yml create mode 100644 specs/spec_recommend.yml diff --git a/specs/paths/abtesting_client/addAbTest.yml b/specs/paths/abtesting_client/addAbTest.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/abtesting_client/addAbTest.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/abtesting_client/deleteAbTest.yml b/specs/paths/abtesting_client/deleteAbTest.yml new file mode 100644 index 0000000000..ac5790e8f8 --- /dev/null +++ b/specs/paths/abtesting_client/deleteAbTest.yml @@ -0,0 +1 @@ +delete: diff --git a/specs/paths/abtesting_client/getAbTest.yml b/specs/paths/abtesting_client/getAbTest.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/abtesting_client/getAbTest.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/abtesting_client/listAbTests.yml b/specs/paths/abtesting_client/listAbTests.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/abtesting_client/listAbTests.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/abtesting_client/stopAbTest.yml b/specs/paths/abtesting_client/stopAbTest.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/abtesting_client/stopAbTest.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/personalization_client/deleteUserProfile.yml b/specs/paths/personalization_client/deleteUserProfile.yml new file mode 100644 index 0000000000..ac5790e8f8 --- /dev/null +++ b/specs/paths/personalization_client/deleteUserProfile.yml @@ -0,0 +1 @@ +delete: diff --git a/specs/paths/personalization_client/getPersonalizationStrategy.yml b/specs/paths/personalization_client/getPersonalizationStrategy.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/personalization_client/getPersonalizationStrategy.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/personalization_client/getUserTokenProfile.yml b/specs/paths/personalization_client/getUserTokenProfile.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/personalization_client/getUserTokenProfile.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/personalization_client/setPersonalizationStrategy.yml b/specs/paths/personalization_client/setPersonalizationStrategy.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/personalization_client/setPersonalizationStrategy.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/query_suggestions_client/createConfiguration.yml b/specs/paths/query_suggestions_client/createConfiguration.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/query_suggestions_client/createConfiguration.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/query_suggestions_client/deleteConfiguration.yml b/specs/paths/query_suggestions_client/deleteConfiguration.yml new file mode 100644 index 0000000000..ac5790e8f8 --- /dev/null +++ b/specs/paths/query_suggestions_client/deleteConfiguration.yml @@ -0,0 +1 @@ +delete: diff --git a/specs/paths/query_suggestions_client/getAllConfigurations.yml b/specs/paths/query_suggestions_client/getAllConfigurations.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/query_suggestions_client/getAllConfigurations.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/query_suggestions_client/getConfiguration.yml b/specs/paths/query_suggestions_client/getConfiguration.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/query_suggestions_client/getConfiguration.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/query_suggestions_client/getConfigurationStatus.yml b/specs/paths/query_suggestions_client/getConfigurationStatus.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/query_suggestions_client/getConfigurationStatus.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/query_suggestions_client/getLogFile.yml b/specs/paths/query_suggestions_client/getLogFile.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/paths/query_suggestions_client/getLogFile.yml @@ -0,0 +1 @@ +get: diff --git a/specs/paths/query_suggestions_client/updateConfiguration.yml b/specs/paths/query_suggestions_client/updateConfiguration.yml new file mode 100644 index 0000000000..3df014f84e --- /dev/null +++ b/specs/paths/query_suggestions_client/updateConfiguration.yml @@ -0,0 +1 @@ +put: diff --git a/specs/paths/recommend_client/getRecommendations.yml b/specs/paths/recommend_client/getRecommendations.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/paths/recommend_client/getRecommendations.yml @@ -0,0 +1 @@ +post: diff --git a/specs/spec_abtesting.yml b/specs/spec_abtesting.yml new file mode 100644 index 0000000000..11412e4d60 --- /dev/null +++ b/specs/spec_abtesting.yml @@ -0,0 +1,46 @@ +openapi: 3.0.2 +info: + title: A/B Testing API + description: API powering the A/B Testing feature of Algolia. + version: 0.0.1 +servers: + - url: https://{appId}-1.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-2.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-3.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-dsn.algolianet.com + variables: + appId: + default: test +components: + securitySchemes: + appId: + type: apiKey + in: header + name: X-Algolia-Application-Id + apiKey: + type: apiKey + in: header + name: X-Algolia-API-Key +security: + - appId: [] + apiKey: [] +paths: +# /2/abtests: +# $ref: './paths/abtesting_client/addAbTest.yml' +# /2/abtests/{id}: +# $ref: './paths/abtesting_client/getAbTest.yml' +# /2/abtests: +# $ref: './paths/abtesting_client/listAbTests.yml' +# /2/abtests/{id}/stop: +# $ref: './paths/abtesting_client/stopAbTest.yml' +# /2/abtests/{id}: +# $ref: './paths/abtesting_client/deleteAbTest.yml' diff --git a/specs/spec_personalization.yml b/specs/spec_personalization.yml new file mode 100644 index 0000000000..e4b3749de4 --- /dev/null +++ b/specs/spec_personalization.yml @@ -0,0 +1,44 @@ +openapi: 3.0.2 +info: + title: Personalization API + description: API powering the Personalization feature of Algolia. + version: 0.0.1 +servers: + - url: https://{appId}-1.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-2.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-3.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-dsn.algolianet.com + variables: + appId: + default: test +components: + securitySchemes: + appId: + type: apiKey + in: header + name: X-Algolia-Application-Id + apiKey: + type: apiKey + in: header + name: X-Algolia-API-Key +security: + - appId: [] + apiKey: [] +paths: +# /1/profiles/personalization/{userToken}: +# $ref: './paths/personalization_client/getUserTokenProfile.yml' +# /1/profiles/{userToken}: +# $ref: './paths/personalization_client/deleteUserProfile.yml' +# /1/strategies/personalization: +# $ref: './paths/personalization_client/getPersonalizationStrategy.yml' +# /1/strategies/personalization: +# $ref: './paths/personalization_client/setPersonalizationStrategy.yml' diff --git a/specs/spec_query_suggestions.yml b/specs/spec_query_suggestions.yml new file mode 100644 index 0000000000..659f6938bd --- /dev/null +++ b/specs/spec_query_suggestions.yml @@ -0,0 +1,50 @@ +openapi: 3.0.2 +info: + title: Query Suggestions API + description: API powering the Query Suggestions feature of Algolia. + version: 0.0.1 +servers: + - url: https://{appId}-1.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-2.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-3.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-dsn.algolianet.com + variables: + appId: + default: test +components: + securitySchemes: + appId: + type: apiKey + in: header + name: X-Algolia-Application-Id + apiKey: + type: apiKey + in: header + name: X-Algolia-API-Key +security: + - appId: [] + apiKey: [] +paths: +# /1/configs: +# $ref: './paths/query_suggestions_client/createConfiguration.yml' +# /1/configs/{indexName}: +# $ref: './paths/query_suggestions_client/updateConfiguration.yml' +# /1/configs/{indexName}: +# $ref: './paths/query_suggestions_client/deleteConfiguration.yml' +# /1/configs/{indexName}: +# $ref: './paths/query_suggestions_client/getConfiguration.yml' +# /1/configs/{indexName}/status: +# $ref: './paths/query_suggestions_client/getConfigurationStatus.yml' +# /1/configs: +# $ref: './paths/query_suggestions_client/getAllConfigurations.yml' +# /1/logs/{indexName}: +# $ref: './paths/query_suggestions_client/getLogFile.yml' diff --git a/specs/spec_recommend.yml b/specs/spec_recommend.yml new file mode 100644 index 0000000000..80c46b564a --- /dev/null +++ b/specs/spec_recommend.yml @@ -0,0 +1,38 @@ +openapi: 3.0.2 +info: + title: Recommend API + description: API powering the Recommend feature of Algolia. + version: 0.0.1 +servers: + - url: https://{appId}-1.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-2.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-3.algolianet.com + variables: + appId: + default: test + - url: https://{appId}-dsn.algolianet.com + variables: + appId: + default: test +components: + securitySchemes: + appId: + type: apiKey + in: header + name: X-Algolia-Application-Id + apiKey: + type: apiKey + in: header + name: X-Algolia-API-Key +security: + - appId: [] + apiKey: [] +paths: +# /1/indexes/*/recommendations: +# $ref: './paths/recommend_client/getRecommendations.yml' diff --git a/specs/spec_search.yml b/specs/spec_search.yml index 53658c23a6..49998b6b1d 100644 --- a/specs/spec_search.yml +++ b/specs/spec_search.yml @@ -7,7 +7,7 @@ servers: - url: https://{appId}-1.algolianet.com variables: appId: - default: test* + default: test - url: https://{appId}-2.algolianet.com variables: appId: From 5874f5e09eb914784521549eb2f47d1c471a246a Mon Sep 17 00:00:00 2001 From: Damien Couchez Date: Wed, 24 Nov 2021 15:07:48 +0100 Subject: [PATCH 03/10] fix: removed servers from specs --- specs/spec_abtesting.yml | 17 ----------------- specs/spec_personalization.yml | 17 ----------------- specs/spec_query_suggestions.yml | 17 ----------------- specs/spec_recommend.yml | 17 ----------------- specs/spec_search.yml | 17 ----------------- 5 files changed, 85 deletions(-) diff --git a/specs/spec_abtesting.yml b/specs/spec_abtesting.yml index 11412e4d60..bafdb00a71 100644 --- a/specs/spec_abtesting.yml +++ b/specs/spec_abtesting.yml @@ -3,23 +3,6 @@ info: title: A/B Testing API description: API powering the A/B Testing feature of Algolia. version: 0.0.1 -servers: - - url: https://{appId}-1.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-2.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-3.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-dsn.algolianet.com - variables: - appId: - default: test components: securitySchemes: appId: diff --git a/specs/spec_personalization.yml b/specs/spec_personalization.yml index e4b3749de4..fcfb5546ab 100644 --- a/specs/spec_personalization.yml +++ b/specs/spec_personalization.yml @@ -3,23 +3,6 @@ info: title: Personalization API description: API powering the Personalization feature of Algolia. version: 0.0.1 -servers: - - url: https://{appId}-1.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-2.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-3.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-dsn.algolianet.com - variables: - appId: - default: test components: securitySchemes: appId: diff --git a/specs/spec_query_suggestions.yml b/specs/spec_query_suggestions.yml index 659f6938bd..e030466b72 100644 --- a/specs/spec_query_suggestions.yml +++ b/specs/spec_query_suggestions.yml @@ -3,23 +3,6 @@ info: title: Query Suggestions API description: API powering the Query Suggestions feature of Algolia. version: 0.0.1 -servers: - - url: https://{appId}-1.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-2.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-3.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-dsn.algolianet.com - variables: - appId: - default: test components: securitySchemes: appId: diff --git a/specs/spec_recommend.yml b/specs/spec_recommend.yml index 80c46b564a..4600563503 100644 --- a/specs/spec_recommend.yml +++ b/specs/spec_recommend.yml @@ -3,23 +3,6 @@ info: title: Recommend API description: API powering the Recommend feature of Algolia. version: 0.0.1 -servers: - - url: https://{appId}-1.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-2.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-3.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-dsn.algolianet.com - variables: - appId: - default: test components: securitySchemes: appId: diff --git a/specs/spec_search.yml b/specs/spec_search.yml index 49998b6b1d..d9ea450c0b 100644 --- a/specs/spec_search.yml +++ b/specs/spec_search.yml @@ -3,23 +3,6 @@ info: title: Search API description: API powering the Search feature of Algolia. version: 0.1.0 -servers: - - url: https://{appId}-1.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-2.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-3.algolianet.com - variables: - appId: - default: test - - url: https://{appId}-dsn.algolianet.com - variables: - appId: - default: test components: securitySchemes: appId: From 2a2c72af1920487e13fbb8aa3cfa5ece3f793a08 Mon Sep 17 00:00:00 2001 From: Damien Couchez Date: Wed, 24 Nov 2021 15:38:58 +0100 Subject: [PATCH 04/10] chore: add generate:search command --- README.md | 2 +- package.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 315468114b..c410c06056 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ nvm use && yarn ## Generate clients based on the [`spec_search.yml` file](./specs/spec_search.yml) ```bash -yarn generate +yarn generate:search ``` ## Build generated clients diff --git a/package.json b/package.json index 61a3fb8913..f356ad9c99 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,9 @@ "lint:specs": "yarn prettier --write specs", "lint": "yarn lint:specs && yarn lint:js", "generate:js": "PACKAGE_VERSION='4.11.0' yarn openapi-generator-cli generate --generator-key javascript-client && yarn install && yarn utils:import-js", + "generate:js:search": "PACKAGE_VERSION='4.11.0' yarn openapi-generator-cli generate -i specs/spec_search.yml --generator-key javascript-client && yarn install && yarn utils:import-js", "generate": "yarn generate:js && yarn lint", + "generate:search": "yarn generate:js:search && yarn lint", "playground:js": "yarn workspace algoliasearch-client-javascript-playground start", "utils:import-js": "mkdir -p -- clients/algoliasearch-client-javascript/utils && cp -R clients/utils/javascript/ clients/algoliasearch-client-javascript/utils" }, From 866037e1ce53410158f729d3f2a20f94b8abbe48 Mon Sep 17 00:00:00 2001 From: Damien Couchez Date: Wed, 24 Nov 2021 16:03:49 +0100 Subject: [PATCH 05/10] feat: reorganize folders --- README.md | 2 +- openapitools.json | 2 +- package.json | 6 +- .../paths}/addAbTest.yml | 0 .../paths}/deleteAbTest.yml | 0 .../paths}/getAbTest.yml | 0 .../paths}/listAbTests.yml | 0 .../paths}/stopAbTest.yml | 0 .../spec.yml} | 10 +- specs/paths/search_client/search/search.yml | 27 --- .../paths}/deleteUserProfile.yml | 0 .../paths}/getPersonalizationStrategy.yml | 0 .../paths}/getUserTokenProfile.yml | 0 .../paths}/setPersonalizationStrategy.yml | 0 .../spec.yml} | 8 +- .../paths}/createConfiguration.yml | 0 .../paths}/deleteConfiguration.yml | 0 .../paths}/getAllConfigurations.yml | 0 .../paths}/getConfiguration.yml | 0 .../paths}/getConfigurationStatus.yml | 0 .../paths}/getLogFile.yml | 0 .../paths}/updateConfiguration.yml | 0 .../spec.yml} | 14 +- .../paths}/getRecommendations.yml | 0 .../spec.yml} | 2 +- specs/{ => search/common}/parameters.yml | 0 .../common}/responses/BadRequest.yml | 0 .../common}/responses/IndexNotFound.yml | 0 .../{ => search/common}/responses/common.yml | 0 .../{ => search/common}/schemas/ErrorBase.yml | 0 .../common}/schemas/IndexSettingsParams.yml | 0 specs/{ => search/common}/schemas/Record.yml | 0 .../common}/schemas/RequestOptions.yml | 0 .../common}/schemas/SearchParams.yml | 0 .../common}/schemas/SearchResponse.yml | 0 .../paths}/advanced/getLogs.yml | 0 .../paths}/advanced/getTask.yml | 0 .../paths}/advanced/isAlive.yml | 0 .../dictionaries/batchDictionaryEntries.yml | 0 .../dictionaries/getDictionaryLanguages.yml | 0 .../dictionaries/getDictionarySettings.yml | 0 .../dictionaries/searchDictionaryEntries.yml | 0 .../dictionaries/setDictionarySettings.yml | 0 .../paths}/keys/addApiKey.yml | 0 .../paths}/keys/deleteApiKey.yml | 0 .../paths}/keys/getApiKey.yml | 0 .../paths}/keys/listApiKeys.yml | 0 .../paths}/keys/restoreApiKey.yml | 0 .../paths}/keys/updateApiKey.yml | 0 .../paths}/manage_indices/copyIndex.yml | 0 .../paths}/manage_indices/deleteIndex.yml | 0 .../paths}/manage_indices/listIndices.yml | 0 .../paths}/multiclusters/assignUserId.yml | 0 .../multiclusters/batchAssignUserIds.yml | 0 .../paths}/multiclusters/getTopUserIds.yml | 0 .../paths}/multiclusters/getUserId.yml | 0 .../multiclusters/hasPendingMappings.yml | 0 .../paths}/multiclusters/listClusters.yml | 0 .../paths}/multiclusters/listUserIds.yml | 0 .../paths}/multiclusters/removeUserId.yml | 0 .../paths}/multiclusters/searchUserIds.yml | 0 .../paths}/objects/batch.yml | 10 +- .../paths}/objects/clearObjects.yml | 0 .../paths}/objects/deleteBy.yml | 0 .../paths}/objects/deleteObject.yml | 0 .../paths}/objects/getObject.yml | 0 .../paths}/objects/multipleBatch.yml | 0 .../paths}/objects/multipleGetObjects.yml | 0 .../paths}/objects/partialUpdate.yml | 0 .../paths}/objects/saveObject.yml | 10 +- .../paths}/objects/updateObject.yml | 0 .../paths}/rules/batchRules.yml | 0 .../paths}/rules/clearRules.yml | 0 .../paths}/rules/deleteRule.yml | 0 .../paths}/rules/getRule.yml | 0 .../paths}/rules/saveRule.yml | 0 .../paths}/rules/searchRules.yml | 0 .../paths}/search/browse.yml | 0 .../paths}/search/multipleQueries.yml | 8 +- specs/search/paths/search/search.yml | 27 +++ .../paths}/search/searchForFacetValues.yml | 0 .../paths}/settings/getSettings.yml | 0 .../paths}/settings/setSettings.yml | 0 .../paths}/synonyms/batchSynonyms.yml | 0 .../paths}/synonyms/clearAllSynonyms.yml | 0 .../paths}/synonyms/deleteSynonym.yml | 0 .../paths}/synonyms/getSynonym.yml | 0 .../paths}/synonyms/saveSynonym.yml | 0 .../paths}/synonyms/searchSynonyms.yml | 0 .../paths}/vault/appendSource.yml | 0 .../paths}/vault/deleteSource.yml | 0 .../paths}/vault/listSources.yml | 0 .../paths}/vault/replaceSources.yml | 0 specs/search/spec.yml | 178 ++++++++++++++++++ specs/spec_search.yml | 178 ------------------ 95 files changed, 241 insertions(+), 241 deletions(-) rename specs/{paths/abtesting_client => abtesting/paths}/addAbTest.yml (100%) rename specs/{paths/abtesting_client => abtesting/paths}/deleteAbTest.yml (100%) rename specs/{paths/abtesting_client => abtesting/paths}/getAbTest.yml (100%) rename specs/{paths/abtesting_client => abtesting/paths}/listAbTests.yml (100%) rename specs/{paths/abtesting_client => abtesting/paths}/stopAbTest.yml (100%) rename specs/{spec_abtesting.yml => abtesting/spec.yml} (63%) delete mode 100644 specs/paths/search_client/search/search.yml rename specs/{paths/personalization_client => personalization/paths}/deleteUserProfile.yml (100%) rename specs/{paths/personalization_client => personalization/paths}/getPersonalizationStrategy.yml (100%) rename specs/{paths/personalization_client => personalization/paths}/getUserTokenProfile.yml (100%) rename specs/{paths/personalization_client => personalization/paths}/setPersonalizationStrategy.yml (100%) rename specs/{spec_personalization.yml => personalization/spec.yml} (64%) rename specs/{paths/query_suggestions_client => query_suggestions/paths}/createConfiguration.yml (100%) rename specs/{paths/query_suggestions_client => query_suggestions/paths}/deleteConfiguration.yml (100%) rename specs/{paths/query_suggestions_client => query_suggestions/paths}/getAllConfigurations.yml (100%) rename specs/{paths/query_suggestions_client => query_suggestions/paths}/getConfiguration.yml (100%) rename specs/{paths/query_suggestions_client => query_suggestions/paths}/getConfigurationStatus.yml (100%) rename specs/{paths/query_suggestions_client => query_suggestions/paths}/getLogFile.yml (100%) rename specs/{paths/query_suggestions_client => query_suggestions/paths}/updateConfiguration.yml (100%) rename specs/{spec_query_suggestions.yml => query_suggestions/spec.yml} (53%) rename specs/{paths/recommend_client => recommend/paths}/getRecommendations.yml (100%) rename specs/{spec_recommend.yml => recommend/spec.yml} (86%) rename specs/{ => search/common}/parameters.yml (100%) rename specs/{ => search/common}/responses/BadRequest.yml (100%) rename specs/{ => search/common}/responses/IndexNotFound.yml (100%) rename specs/{ => search/common}/responses/common.yml (100%) rename specs/{ => search/common}/schemas/ErrorBase.yml (100%) rename specs/{ => search/common}/schemas/IndexSettingsParams.yml (100%) rename specs/{ => search/common}/schemas/Record.yml (100%) rename specs/{ => search/common}/schemas/RequestOptions.yml (100%) rename specs/{ => search/common}/schemas/SearchParams.yml (100%) rename specs/{ => search/common}/schemas/SearchResponse.yml (100%) rename specs/{paths/search_client => search/paths}/advanced/getLogs.yml (100%) rename specs/{paths/search_client => search/paths}/advanced/getTask.yml (100%) rename specs/{paths/search_client => search/paths}/advanced/isAlive.yml (100%) rename specs/{paths/search_client => search/paths}/dictionaries/batchDictionaryEntries.yml (100%) rename specs/{paths/search_client => search/paths}/dictionaries/getDictionaryLanguages.yml (100%) rename specs/{paths/search_client => search/paths}/dictionaries/getDictionarySettings.yml (100%) rename specs/{paths/search_client => search/paths}/dictionaries/searchDictionaryEntries.yml (100%) rename specs/{paths/search_client => search/paths}/dictionaries/setDictionarySettings.yml (100%) rename specs/{paths/search_client => search/paths}/keys/addApiKey.yml (100%) rename specs/{paths/search_client => search/paths}/keys/deleteApiKey.yml (100%) rename specs/{paths/search_client => search/paths}/keys/getApiKey.yml (100%) rename specs/{paths/search_client => search/paths}/keys/listApiKeys.yml (100%) rename specs/{paths/search_client => search/paths}/keys/restoreApiKey.yml (100%) rename specs/{paths/search_client => search/paths}/keys/updateApiKey.yml (100%) rename specs/{paths/search_client => search/paths}/manage_indices/copyIndex.yml (100%) rename specs/{paths/search_client => search/paths}/manage_indices/deleteIndex.yml (100%) rename specs/{paths/search_client => search/paths}/manage_indices/listIndices.yml (100%) rename specs/{paths/search_client => search/paths}/multiclusters/assignUserId.yml (100%) rename specs/{paths/search_client => search/paths}/multiclusters/batchAssignUserIds.yml (100%) rename specs/{paths/search_client => search/paths}/multiclusters/getTopUserIds.yml (100%) rename specs/{paths/search_client => search/paths}/multiclusters/getUserId.yml (100%) rename specs/{paths/search_client => search/paths}/multiclusters/hasPendingMappings.yml (100%) rename specs/{paths/search_client => search/paths}/multiclusters/listClusters.yml (100%) rename specs/{paths/search_client => search/paths}/multiclusters/listUserIds.yml (100%) rename specs/{paths/search_client => search/paths}/multiclusters/removeUserId.yml (100%) rename specs/{paths/search_client => search/paths}/multiclusters/searchUserIds.yml (100%) rename specs/{paths/search_client => search/paths}/objects/batch.yml (83%) rename specs/{paths/search_client => search/paths}/objects/clearObjects.yml (100%) rename specs/{paths/search_client => search/paths}/objects/deleteBy.yml (100%) rename specs/{paths/search_client => search/paths}/objects/deleteObject.yml (100%) rename specs/{paths/search_client => search/paths}/objects/getObject.yml (100%) rename specs/{paths/search_client => search/paths}/objects/multipleBatch.yml (100%) rename specs/{paths/search_client => search/paths}/objects/multipleGetObjects.yml (100%) rename specs/{paths/search_client => search/paths}/objects/partialUpdate.yml (100%) rename specs/{paths/search_client => search/paths}/objects/saveObject.yml (69%) rename specs/{paths/search_client => search/paths}/objects/updateObject.yml (100%) rename specs/{paths/search_client => search/paths}/rules/batchRules.yml (100%) rename specs/{paths/search_client => search/paths}/rules/clearRules.yml (100%) rename specs/{paths/search_client => search/paths}/rules/deleteRule.yml (100%) rename specs/{paths/search_client => search/paths}/rules/getRule.yml (100%) rename specs/{paths/search_client => search/paths}/rules/saveRule.yml (100%) rename specs/{paths/search_client => search/paths}/rules/searchRules.yml (100%) rename specs/{paths/search_client => search/paths}/search/browse.yml (100%) rename specs/{paths/search_client => search/paths}/search/multipleQueries.yml (86%) create mode 100644 specs/search/paths/search/search.yml rename specs/{paths/search_client => search/paths}/search/searchForFacetValues.yml (100%) rename specs/{paths/search_client => search/paths}/settings/getSettings.yml (100%) rename specs/{paths/search_client => search/paths}/settings/setSettings.yml (100%) rename specs/{paths/search_client => search/paths}/synonyms/batchSynonyms.yml (100%) rename specs/{paths/search_client => search/paths}/synonyms/clearAllSynonyms.yml (100%) rename specs/{paths/search_client => search/paths}/synonyms/deleteSynonym.yml (100%) rename specs/{paths/search_client => search/paths}/synonyms/getSynonym.yml (100%) rename specs/{paths/search_client => search/paths}/synonyms/saveSynonym.yml (100%) rename specs/{paths/search_client => search/paths}/synonyms/searchSynonyms.yml (100%) rename specs/{paths/search_client => search/paths}/vault/appendSource.yml (100%) rename specs/{paths/search_client => search/paths}/vault/deleteSource.yml (100%) rename specs/{paths/search_client => search/paths}/vault/listSources.yml (100%) rename specs/{paths/search_client => search/paths}/vault/replaceSources.yml (100%) create mode 100644 specs/search/spec.yml delete mode 100644 specs/spec_search.yml diff --git a/README.md b/README.md index c410c06056..4a96094493 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ nvm use && yarn ``` -## Generate clients based on the [`spec_search.yml` file](./specs/spec_search.yml) +## Generate clients based on the [`spec.yml` file](./search/specs.yml) ```bash yarn generate:search diff --git a/openapitools.json b/openapitools.json index 98c9535de1..fa58cee756 100644 --- a/openapitools.json +++ b/openapitools.json @@ -9,7 +9,7 @@ "config": "#{cwd}/openapitools.json", "apiPackage": "client-search", "output": "#{cwd}/clients/algoliasearch-client-javascript", - "glob": "specs/spec_search.yml", + "glob": "specs/search/spec.yml", "gitHost": "algolia", "gitUserId": "algolia", "gitRepoId": "algoliasearch-client-javascript", diff --git a/package.json b/package.json index f356ad9c99..a844a49e83 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "playground/javascript/" ], "scripts": { - "build:spec": "yarn swagger-cli bundle specs/spec_search.yml --outfile dist/openapi.yml --type yaml", - "build:spec:json": "yarn swagger-cli bundle specs/spec_search.yml --outfile dist/openapi.json --type json", + "build:spec": "yarn swagger-cli bundle specs/search/spec.yml --outfile dist/openapi.yml --type yaml", + "build:spec:json": "yarn swagger-cli bundle specs/search/spec.yml --outfile dist/openapi.json --type json", "clean": "rm -rf **/dist **/build **/node_modules", "client:build-js": "cd clients/algoliasearch-client-javascript/ && yarn install && yarn build && cd ../../", "client:build": "yarn client:build-js", @@ -15,7 +15,7 @@ "lint:specs": "yarn prettier --write specs", "lint": "yarn lint:specs && yarn lint:js", "generate:js": "PACKAGE_VERSION='4.11.0' yarn openapi-generator-cli generate --generator-key javascript-client && yarn install && yarn utils:import-js", - "generate:js:search": "PACKAGE_VERSION='4.11.0' yarn openapi-generator-cli generate -i specs/spec_search.yml --generator-key javascript-client && yarn install && yarn utils:import-js", + "generate:js:search": "PACKAGE_VERSION='4.11.0' yarn openapi-generator-cli generate -i specs/search/spec.yml --generator-key javascript-client && yarn install && yarn utils:import-js", "generate": "yarn generate:js && yarn lint", "generate:search": "yarn generate:js:search && yarn lint", "playground:js": "yarn workspace algoliasearch-client-javascript-playground start", diff --git a/specs/paths/abtesting_client/addAbTest.yml b/specs/abtesting/paths/addAbTest.yml similarity index 100% rename from specs/paths/abtesting_client/addAbTest.yml rename to specs/abtesting/paths/addAbTest.yml diff --git a/specs/paths/abtesting_client/deleteAbTest.yml b/specs/abtesting/paths/deleteAbTest.yml similarity index 100% rename from specs/paths/abtesting_client/deleteAbTest.yml rename to specs/abtesting/paths/deleteAbTest.yml diff --git a/specs/paths/abtesting_client/getAbTest.yml b/specs/abtesting/paths/getAbTest.yml similarity index 100% rename from specs/paths/abtesting_client/getAbTest.yml rename to specs/abtesting/paths/getAbTest.yml diff --git a/specs/paths/abtesting_client/listAbTests.yml b/specs/abtesting/paths/listAbTests.yml similarity index 100% rename from specs/paths/abtesting_client/listAbTests.yml rename to specs/abtesting/paths/listAbTests.yml diff --git a/specs/paths/abtesting_client/stopAbTest.yml b/specs/abtesting/paths/stopAbTest.yml similarity index 100% rename from specs/paths/abtesting_client/stopAbTest.yml rename to specs/abtesting/paths/stopAbTest.yml diff --git a/specs/spec_abtesting.yml b/specs/abtesting/spec.yml similarity index 63% rename from specs/spec_abtesting.yml rename to specs/abtesting/spec.yml index bafdb00a71..3274d6b651 100644 --- a/specs/spec_abtesting.yml +++ b/specs/abtesting/spec.yml @@ -18,12 +18,12 @@ security: apiKey: [] paths: # /2/abtests: -# $ref: './paths/abtesting_client/addAbTest.yml' +# $ref: './paths/addAbTest.yml' # /2/abtests/{id}: -# $ref: './paths/abtesting_client/getAbTest.yml' +# $ref: './paths/getAbTest.yml' # /2/abtests: -# $ref: './paths/abtesting_client/listAbTests.yml' +# $ref: './paths/listAbTests.yml' # /2/abtests/{id}/stop: -# $ref: './paths/abtesting_client/stopAbTest.yml' +# $ref: './paths/stopAbTest.yml' # /2/abtests/{id}: -# $ref: './paths/abtesting_client/deleteAbTest.yml' +# $ref: './paths/deleteAbTest.yml' diff --git a/specs/paths/search_client/search/search.yml b/specs/paths/search_client/search/search.yml deleted file mode 100644 index cba2f916d1..0000000000 --- a/specs/paths/search_client/search/search.yml +++ /dev/null @@ -1,27 +0,0 @@ -post: - tags: - - search - operationId: search - summary: Get search results - parameters: - - $ref: '../../../parameters.yml#/IndexName' - requestBody: - required: true - content: - application/json: - schema: - oneOf: - - $ref: ../../../schemas/SearchParams.yml#/searchParams - - $ref: ../../../schemas/SearchParams.yml#/searchParamsString - responses: - '200': - description: OK - content: - application/json: - schema: - title: singleQueryResponse - $ref: ../../../schemas/SearchResponse.yml#/searchResponse - '400': - $ref: ../../../responses/BadRequest.yml - '404': - $ref: ../../../responses/IndexNotFound.yml diff --git a/specs/paths/personalization_client/deleteUserProfile.yml b/specs/personalization/paths/deleteUserProfile.yml similarity index 100% rename from specs/paths/personalization_client/deleteUserProfile.yml rename to specs/personalization/paths/deleteUserProfile.yml diff --git a/specs/paths/personalization_client/getPersonalizationStrategy.yml b/specs/personalization/paths/getPersonalizationStrategy.yml similarity index 100% rename from specs/paths/personalization_client/getPersonalizationStrategy.yml rename to specs/personalization/paths/getPersonalizationStrategy.yml diff --git a/specs/paths/personalization_client/getUserTokenProfile.yml b/specs/personalization/paths/getUserTokenProfile.yml similarity index 100% rename from specs/paths/personalization_client/getUserTokenProfile.yml rename to specs/personalization/paths/getUserTokenProfile.yml diff --git a/specs/paths/personalization_client/setPersonalizationStrategy.yml b/specs/personalization/paths/setPersonalizationStrategy.yml similarity index 100% rename from specs/paths/personalization_client/setPersonalizationStrategy.yml rename to specs/personalization/paths/setPersonalizationStrategy.yml diff --git a/specs/spec_personalization.yml b/specs/personalization/spec.yml similarity index 64% rename from specs/spec_personalization.yml rename to specs/personalization/spec.yml index fcfb5546ab..236a433076 100644 --- a/specs/spec_personalization.yml +++ b/specs/personalization/spec.yml @@ -18,10 +18,10 @@ security: apiKey: [] paths: # /1/profiles/personalization/{userToken}: -# $ref: './paths/personalization_client/getUserTokenProfile.yml' +# $ref: './paths/getUserTokenProfile.yml' # /1/profiles/{userToken}: -# $ref: './paths/personalization_client/deleteUserProfile.yml' +# $ref: './paths/deleteUserProfile.yml' # /1/strategies/personalization: -# $ref: './paths/personalization_client/getPersonalizationStrategy.yml' +# $ref: './paths/getPersonalizationStrategy.yml' # /1/strategies/personalization: -# $ref: './paths/personalization_client/setPersonalizationStrategy.yml' +# $ref: './paths/setPersonalizationStrategy.yml' diff --git a/specs/paths/query_suggestions_client/createConfiguration.yml b/specs/query_suggestions/paths/createConfiguration.yml similarity index 100% rename from specs/paths/query_suggestions_client/createConfiguration.yml rename to specs/query_suggestions/paths/createConfiguration.yml diff --git a/specs/paths/query_suggestions_client/deleteConfiguration.yml b/specs/query_suggestions/paths/deleteConfiguration.yml similarity index 100% rename from specs/paths/query_suggestions_client/deleteConfiguration.yml rename to specs/query_suggestions/paths/deleteConfiguration.yml diff --git a/specs/paths/query_suggestions_client/getAllConfigurations.yml b/specs/query_suggestions/paths/getAllConfigurations.yml similarity index 100% rename from specs/paths/query_suggestions_client/getAllConfigurations.yml rename to specs/query_suggestions/paths/getAllConfigurations.yml diff --git a/specs/paths/query_suggestions_client/getConfiguration.yml b/specs/query_suggestions/paths/getConfiguration.yml similarity index 100% rename from specs/paths/query_suggestions_client/getConfiguration.yml rename to specs/query_suggestions/paths/getConfiguration.yml diff --git a/specs/paths/query_suggestions_client/getConfigurationStatus.yml b/specs/query_suggestions/paths/getConfigurationStatus.yml similarity index 100% rename from specs/paths/query_suggestions_client/getConfigurationStatus.yml rename to specs/query_suggestions/paths/getConfigurationStatus.yml diff --git a/specs/paths/query_suggestions_client/getLogFile.yml b/specs/query_suggestions/paths/getLogFile.yml similarity index 100% rename from specs/paths/query_suggestions_client/getLogFile.yml rename to specs/query_suggestions/paths/getLogFile.yml diff --git a/specs/paths/query_suggestions_client/updateConfiguration.yml b/specs/query_suggestions/paths/updateConfiguration.yml similarity index 100% rename from specs/paths/query_suggestions_client/updateConfiguration.yml rename to specs/query_suggestions/paths/updateConfiguration.yml diff --git a/specs/spec_query_suggestions.yml b/specs/query_suggestions/spec.yml similarity index 53% rename from specs/spec_query_suggestions.yml rename to specs/query_suggestions/spec.yml index e030466b72..555e1d8812 100644 --- a/specs/spec_query_suggestions.yml +++ b/specs/query_suggestions/spec.yml @@ -18,16 +18,16 @@ security: apiKey: [] paths: # /1/configs: -# $ref: './paths/query_suggestions_client/createConfiguration.yml' +# $ref: './paths/createConfiguration.yml' # /1/configs/{indexName}: -# $ref: './paths/query_suggestions_client/updateConfiguration.yml' +# $ref: './paths/updateConfiguration.yml' # /1/configs/{indexName}: -# $ref: './paths/query_suggestions_client/deleteConfiguration.yml' +# $ref: './paths/deleteConfiguration.yml' # /1/configs/{indexName}: -# $ref: './paths/query_suggestions_client/getConfiguration.yml' +# $ref: './paths/getConfiguration.yml' # /1/configs/{indexName}/status: -# $ref: './paths/query_suggestions_client/getConfigurationStatus.yml' +# $ref: './paths/getConfigurationStatus.yml' # /1/configs: -# $ref: './paths/query_suggestions_client/getAllConfigurations.yml' +# $ref: './paths/getAllConfigurations.yml' # /1/logs/{indexName}: -# $ref: './paths/query_suggestions_client/getLogFile.yml' +# $ref: './paths/getLogFile.yml' diff --git a/specs/paths/recommend_client/getRecommendations.yml b/specs/recommend/paths/getRecommendations.yml similarity index 100% rename from specs/paths/recommend_client/getRecommendations.yml rename to specs/recommend/paths/getRecommendations.yml diff --git a/specs/spec_recommend.yml b/specs/recommend/spec.yml similarity index 86% rename from specs/spec_recommend.yml rename to specs/recommend/spec.yml index 4600563503..8b6ab42377 100644 --- a/specs/spec_recommend.yml +++ b/specs/recommend/spec.yml @@ -18,4 +18,4 @@ security: apiKey: [] paths: # /1/indexes/*/recommendations: -# $ref: './paths/recommend_client/getRecommendations.yml' +# $ref: './paths/getRecommendations.yml' diff --git a/specs/parameters.yml b/specs/search/common/parameters.yml similarity index 100% rename from specs/parameters.yml rename to specs/search/common/parameters.yml diff --git a/specs/responses/BadRequest.yml b/specs/search/common/responses/BadRequest.yml similarity index 100% rename from specs/responses/BadRequest.yml rename to specs/search/common/responses/BadRequest.yml diff --git a/specs/responses/IndexNotFound.yml b/specs/search/common/responses/IndexNotFound.yml similarity index 100% rename from specs/responses/IndexNotFound.yml rename to specs/search/common/responses/IndexNotFound.yml diff --git a/specs/responses/common.yml b/specs/search/common/responses/common.yml similarity index 100% rename from specs/responses/common.yml rename to specs/search/common/responses/common.yml diff --git a/specs/schemas/ErrorBase.yml b/specs/search/common/schemas/ErrorBase.yml similarity index 100% rename from specs/schemas/ErrorBase.yml rename to specs/search/common/schemas/ErrorBase.yml diff --git a/specs/schemas/IndexSettingsParams.yml b/specs/search/common/schemas/IndexSettingsParams.yml similarity index 100% rename from specs/schemas/IndexSettingsParams.yml rename to specs/search/common/schemas/IndexSettingsParams.yml diff --git a/specs/schemas/Record.yml b/specs/search/common/schemas/Record.yml similarity index 100% rename from specs/schemas/Record.yml rename to specs/search/common/schemas/Record.yml diff --git a/specs/schemas/RequestOptions.yml b/specs/search/common/schemas/RequestOptions.yml similarity index 100% rename from specs/schemas/RequestOptions.yml rename to specs/search/common/schemas/RequestOptions.yml diff --git a/specs/schemas/SearchParams.yml b/specs/search/common/schemas/SearchParams.yml similarity index 100% rename from specs/schemas/SearchParams.yml rename to specs/search/common/schemas/SearchParams.yml diff --git a/specs/schemas/SearchResponse.yml b/specs/search/common/schemas/SearchResponse.yml similarity index 100% rename from specs/schemas/SearchResponse.yml rename to specs/search/common/schemas/SearchResponse.yml diff --git a/specs/paths/search_client/advanced/getLogs.yml b/specs/search/paths/advanced/getLogs.yml similarity index 100% rename from specs/paths/search_client/advanced/getLogs.yml rename to specs/search/paths/advanced/getLogs.yml diff --git a/specs/paths/search_client/advanced/getTask.yml b/specs/search/paths/advanced/getTask.yml similarity index 100% rename from specs/paths/search_client/advanced/getTask.yml rename to specs/search/paths/advanced/getTask.yml diff --git a/specs/paths/search_client/advanced/isAlive.yml b/specs/search/paths/advanced/isAlive.yml similarity index 100% rename from specs/paths/search_client/advanced/isAlive.yml rename to specs/search/paths/advanced/isAlive.yml diff --git a/specs/paths/search_client/dictionaries/batchDictionaryEntries.yml b/specs/search/paths/dictionaries/batchDictionaryEntries.yml similarity index 100% rename from specs/paths/search_client/dictionaries/batchDictionaryEntries.yml rename to specs/search/paths/dictionaries/batchDictionaryEntries.yml diff --git a/specs/paths/search_client/dictionaries/getDictionaryLanguages.yml b/specs/search/paths/dictionaries/getDictionaryLanguages.yml similarity index 100% rename from specs/paths/search_client/dictionaries/getDictionaryLanguages.yml rename to specs/search/paths/dictionaries/getDictionaryLanguages.yml diff --git a/specs/paths/search_client/dictionaries/getDictionarySettings.yml b/specs/search/paths/dictionaries/getDictionarySettings.yml similarity index 100% rename from specs/paths/search_client/dictionaries/getDictionarySettings.yml rename to specs/search/paths/dictionaries/getDictionarySettings.yml diff --git a/specs/paths/search_client/dictionaries/searchDictionaryEntries.yml b/specs/search/paths/dictionaries/searchDictionaryEntries.yml similarity index 100% rename from specs/paths/search_client/dictionaries/searchDictionaryEntries.yml rename to specs/search/paths/dictionaries/searchDictionaryEntries.yml diff --git a/specs/paths/search_client/dictionaries/setDictionarySettings.yml b/specs/search/paths/dictionaries/setDictionarySettings.yml similarity index 100% rename from specs/paths/search_client/dictionaries/setDictionarySettings.yml rename to specs/search/paths/dictionaries/setDictionarySettings.yml diff --git a/specs/paths/search_client/keys/addApiKey.yml b/specs/search/paths/keys/addApiKey.yml similarity index 100% rename from specs/paths/search_client/keys/addApiKey.yml rename to specs/search/paths/keys/addApiKey.yml diff --git a/specs/paths/search_client/keys/deleteApiKey.yml b/specs/search/paths/keys/deleteApiKey.yml similarity index 100% rename from specs/paths/search_client/keys/deleteApiKey.yml rename to specs/search/paths/keys/deleteApiKey.yml diff --git a/specs/paths/search_client/keys/getApiKey.yml b/specs/search/paths/keys/getApiKey.yml similarity index 100% rename from specs/paths/search_client/keys/getApiKey.yml rename to specs/search/paths/keys/getApiKey.yml diff --git a/specs/paths/search_client/keys/listApiKeys.yml b/specs/search/paths/keys/listApiKeys.yml similarity index 100% rename from specs/paths/search_client/keys/listApiKeys.yml rename to specs/search/paths/keys/listApiKeys.yml diff --git a/specs/paths/search_client/keys/restoreApiKey.yml b/specs/search/paths/keys/restoreApiKey.yml similarity index 100% rename from specs/paths/search_client/keys/restoreApiKey.yml rename to specs/search/paths/keys/restoreApiKey.yml diff --git a/specs/paths/search_client/keys/updateApiKey.yml b/specs/search/paths/keys/updateApiKey.yml similarity index 100% rename from specs/paths/search_client/keys/updateApiKey.yml rename to specs/search/paths/keys/updateApiKey.yml diff --git a/specs/paths/search_client/manage_indices/copyIndex.yml b/specs/search/paths/manage_indices/copyIndex.yml similarity index 100% rename from specs/paths/search_client/manage_indices/copyIndex.yml rename to specs/search/paths/manage_indices/copyIndex.yml diff --git a/specs/paths/search_client/manage_indices/deleteIndex.yml b/specs/search/paths/manage_indices/deleteIndex.yml similarity index 100% rename from specs/paths/search_client/manage_indices/deleteIndex.yml rename to specs/search/paths/manage_indices/deleteIndex.yml diff --git a/specs/paths/search_client/manage_indices/listIndices.yml b/specs/search/paths/manage_indices/listIndices.yml similarity index 100% rename from specs/paths/search_client/manage_indices/listIndices.yml rename to specs/search/paths/manage_indices/listIndices.yml diff --git a/specs/paths/search_client/multiclusters/assignUserId.yml b/specs/search/paths/multiclusters/assignUserId.yml similarity index 100% rename from specs/paths/search_client/multiclusters/assignUserId.yml rename to specs/search/paths/multiclusters/assignUserId.yml diff --git a/specs/paths/search_client/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml similarity index 100% rename from specs/paths/search_client/multiclusters/batchAssignUserIds.yml rename to specs/search/paths/multiclusters/batchAssignUserIds.yml diff --git a/specs/paths/search_client/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml similarity index 100% rename from specs/paths/search_client/multiclusters/getTopUserIds.yml rename to specs/search/paths/multiclusters/getTopUserIds.yml diff --git a/specs/paths/search_client/multiclusters/getUserId.yml b/specs/search/paths/multiclusters/getUserId.yml similarity index 100% rename from specs/paths/search_client/multiclusters/getUserId.yml rename to specs/search/paths/multiclusters/getUserId.yml diff --git a/specs/paths/search_client/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml similarity index 100% rename from specs/paths/search_client/multiclusters/hasPendingMappings.yml rename to specs/search/paths/multiclusters/hasPendingMappings.yml diff --git a/specs/paths/search_client/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml similarity index 100% rename from specs/paths/search_client/multiclusters/listClusters.yml rename to specs/search/paths/multiclusters/listClusters.yml diff --git a/specs/paths/search_client/multiclusters/listUserIds.yml b/specs/search/paths/multiclusters/listUserIds.yml similarity index 100% rename from specs/paths/search_client/multiclusters/listUserIds.yml rename to specs/search/paths/multiclusters/listUserIds.yml diff --git a/specs/paths/search_client/multiclusters/removeUserId.yml b/specs/search/paths/multiclusters/removeUserId.yml similarity index 100% rename from specs/paths/search_client/multiclusters/removeUserId.yml rename to specs/search/paths/multiclusters/removeUserId.yml diff --git a/specs/paths/search_client/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml similarity index 100% rename from specs/paths/search_client/multiclusters/searchUserIds.yml rename to specs/search/paths/multiclusters/searchUserIds.yml diff --git a/specs/paths/search_client/objects/batch.yml b/specs/search/paths/objects/batch.yml similarity index 83% rename from specs/paths/search_client/objects/batch.yml rename to specs/search/paths/objects/batch.yml index 5f643a8296..e5e1de03e6 100644 --- a/specs/paths/search_client/objects/batch.yml +++ b/specs/search/paths/objects/batch.yml @@ -4,7 +4,7 @@ post: operationId: batch summary: Performs multiple write operations in a single API call parameters: - - $ref: '../../../parameters.yml#/IndexName' + - $ref: '../../common/parameters.yml#/IndexName' requestBody: required: true content: @@ -48,10 +48,10 @@ post: additionalProperties: false properties: taskID: - $ref: '../../../responses/common.yml#/taskID' + $ref: '../../common/responses/common.yml#/taskID' objectIDs: - $ref: '../../../responses/common.yml#/objectIDs' + $ref: '../../common/responses/common.yml#/objectIDs' '400': - $ref: '../../../responses/BadRequest.yml' + $ref: '../../common/responses/BadRequest.yml' '404': - $ref: '../../../responses/IndexNotFound.yml' + $ref: '../../common/responses/IndexNotFound.yml' diff --git a/specs/paths/search_client/objects/clearObjects.yml b/specs/search/paths/objects/clearObjects.yml similarity index 100% rename from specs/paths/search_client/objects/clearObjects.yml rename to specs/search/paths/objects/clearObjects.yml diff --git a/specs/paths/search_client/objects/deleteBy.yml b/specs/search/paths/objects/deleteBy.yml similarity index 100% rename from specs/paths/search_client/objects/deleteBy.yml rename to specs/search/paths/objects/deleteBy.yml diff --git a/specs/paths/search_client/objects/deleteObject.yml b/specs/search/paths/objects/deleteObject.yml similarity index 100% rename from specs/paths/search_client/objects/deleteObject.yml rename to specs/search/paths/objects/deleteObject.yml diff --git a/specs/paths/search_client/objects/getObject.yml b/specs/search/paths/objects/getObject.yml similarity index 100% rename from specs/paths/search_client/objects/getObject.yml rename to specs/search/paths/objects/getObject.yml diff --git a/specs/paths/search_client/objects/multipleBatch.yml b/specs/search/paths/objects/multipleBatch.yml similarity index 100% rename from specs/paths/search_client/objects/multipleBatch.yml rename to specs/search/paths/objects/multipleBatch.yml diff --git a/specs/paths/search_client/objects/multipleGetObjects.yml b/specs/search/paths/objects/multipleGetObjects.yml similarity index 100% rename from specs/paths/search_client/objects/multipleGetObjects.yml rename to specs/search/paths/objects/multipleGetObjects.yml diff --git a/specs/paths/search_client/objects/partialUpdate.yml b/specs/search/paths/objects/partialUpdate.yml similarity index 100% rename from specs/paths/search_client/objects/partialUpdate.yml rename to specs/search/paths/objects/partialUpdate.yml diff --git a/specs/paths/search_client/objects/saveObject.yml b/specs/search/paths/objects/saveObject.yml similarity index 69% rename from specs/paths/search_client/objects/saveObject.yml rename to specs/search/paths/objects/saveObject.yml index 9906f540c6..861cd426c8 100644 --- a/specs/paths/search_client/objects/saveObject.yml +++ b/specs/search/paths/objects/saveObject.yml @@ -5,7 +5,7 @@ post: summary: Save object description: Add an object to the index, automatically assigning it an object ID parameters: - - $ref: '../../../parameters.yml#/IndexName' + - $ref: '../../common/parameters.yml#/IndexName' requestBody: required: true content: @@ -26,10 +26,10 @@ post: createdAt: type: string taskID: - $ref: '../../../responses/common.yml#/taskID' + $ref: '../../common/responses/common.yml#/taskID' objectID: - $ref: '../../../responses/common.yml#/objectID' + $ref: '../../common/responses/common.yml#/objectID' '400': - $ref: '../../../responses/BadRequest.yml' + $ref: '../../common/responses/BadRequest.yml' '404': - $ref: '../../../responses/IndexNotFound.yml' + $ref: '../../common/responses/IndexNotFound.yml' diff --git a/specs/paths/search_client/objects/updateObject.yml b/specs/search/paths/objects/updateObject.yml similarity index 100% rename from specs/paths/search_client/objects/updateObject.yml rename to specs/search/paths/objects/updateObject.yml diff --git a/specs/paths/search_client/rules/batchRules.yml b/specs/search/paths/rules/batchRules.yml similarity index 100% rename from specs/paths/search_client/rules/batchRules.yml rename to specs/search/paths/rules/batchRules.yml diff --git a/specs/paths/search_client/rules/clearRules.yml b/specs/search/paths/rules/clearRules.yml similarity index 100% rename from specs/paths/search_client/rules/clearRules.yml rename to specs/search/paths/rules/clearRules.yml diff --git a/specs/paths/search_client/rules/deleteRule.yml b/specs/search/paths/rules/deleteRule.yml similarity index 100% rename from specs/paths/search_client/rules/deleteRule.yml rename to specs/search/paths/rules/deleteRule.yml diff --git a/specs/paths/search_client/rules/getRule.yml b/specs/search/paths/rules/getRule.yml similarity index 100% rename from specs/paths/search_client/rules/getRule.yml rename to specs/search/paths/rules/getRule.yml diff --git a/specs/paths/search_client/rules/saveRule.yml b/specs/search/paths/rules/saveRule.yml similarity index 100% rename from specs/paths/search_client/rules/saveRule.yml rename to specs/search/paths/rules/saveRule.yml diff --git a/specs/paths/search_client/rules/searchRules.yml b/specs/search/paths/rules/searchRules.yml similarity index 100% rename from specs/paths/search_client/rules/searchRules.yml rename to specs/search/paths/rules/searchRules.yml diff --git a/specs/paths/search_client/search/browse.yml b/specs/search/paths/search/browse.yml similarity index 100% rename from specs/paths/search_client/search/browse.yml rename to specs/search/paths/search/browse.yml diff --git a/specs/paths/search_client/search/multipleQueries.yml b/specs/search/paths/search/multipleQueries.yml similarity index 86% rename from specs/paths/search_client/search/multipleQueries.yml rename to specs/search/paths/search/multipleQueries.yml index 6f9902bec2..399602cde4 100644 --- a/specs/paths/search_client/search/multipleQueries.yml +++ b/specs/search/paths/search/multipleQueries.yml @@ -24,7 +24,7 @@ post: example: products description: The Algolia index name query: - $ref: ../../../schemas/SearchParams.yml#/searchParams/properties/query + $ref: ../../common/schemas/SearchParams.yml#/searchParams/properties/query type: type: string enum: [default, facet] @@ -56,8 +56,8 @@ post: results: type: array items: - $ref: ../../../schemas/SearchResponse.yml#/searchResponse + $ref: ../../common/schemas/SearchResponse.yml#/searchResponse '400': - $ref: ../../../responses/BadRequest.yml + $ref: ../../common/responses/BadRequest.yml '404': - $ref: ../../../responses/IndexNotFound.yml + $ref: ../../common/responses/IndexNotFound.yml diff --git a/specs/search/paths/search/search.yml b/specs/search/paths/search/search.yml new file mode 100644 index 0000000000..571a83aff3 --- /dev/null +++ b/specs/search/paths/search/search.yml @@ -0,0 +1,27 @@ +post: + tags: + - search + operationId: search + summary: Get search results + parameters: + - $ref: '../../common/parameters.yml#/IndexName' + requestBody: + required: true + content: + application/json: + schema: + oneOf: + - $ref: ../../common/schemas/SearchParams.yml#/searchParams + - $ref: ../../common/schemas/SearchParams.yml#/searchParamsString + responses: + '200': + description: OK + content: + application/json: + schema: + title: singleQueryResponse + $ref: ../../common/schemas/SearchResponse.yml#/searchResponse + '400': + $ref: ../../common/responses/BadRequest.yml + '404': + $ref: ../../common/responses/IndexNotFound.yml diff --git a/specs/paths/search_client/search/searchForFacetValues.yml b/specs/search/paths/search/searchForFacetValues.yml similarity index 100% rename from specs/paths/search_client/search/searchForFacetValues.yml rename to specs/search/paths/search/searchForFacetValues.yml diff --git a/specs/paths/search_client/settings/getSettings.yml b/specs/search/paths/settings/getSettings.yml similarity index 100% rename from specs/paths/search_client/settings/getSettings.yml rename to specs/search/paths/settings/getSettings.yml diff --git a/specs/paths/search_client/settings/setSettings.yml b/specs/search/paths/settings/setSettings.yml similarity index 100% rename from specs/paths/search_client/settings/setSettings.yml rename to specs/search/paths/settings/setSettings.yml diff --git a/specs/paths/search_client/synonyms/batchSynonyms.yml b/specs/search/paths/synonyms/batchSynonyms.yml similarity index 100% rename from specs/paths/search_client/synonyms/batchSynonyms.yml rename to specs/search/paths/synonyms/batchSynonyms.yml diff --git a/specs/paths/search_client/synonyms/clearAllSynonyms.yml b/specs/search/paths/synonyms/clearAllSynonyms.yml similarity index 100% rename from specs/paths/search_client/synonyms/clearAllSynonyms.yml rename to specs/search/paths/synonyms/clearAllSynonyms.yml diff --git a/specs/paths/search_client/synonyms/deleteSynonym.yml b/specs/search/paths/synonyms/deleteSynonym.yml similarity index 100% rename from specs/paths/search_client/synonyms/deleteSynonym.yml rename to specs/search/paths/synonyms/deleteSynonym.yml diff --git a/specs/paths/search_client/synonyms/getSynonym.yml b/specs/search/paths/synonyms/getSynonym.yml similarity index 100% rename from specs/paths/search_client/synonyms/getSynonym.yml rename to specs/search/paths/synonyms/getSynonym.yml diff --git a/specs/paths/search_client/synonyms/saveSynonym.yml b/specs/search/paths/synonyms/saveSynonym.yml similarity index 100% rename from specs/paths/search_client/synonyms/saveSynonym.yml rename to specs/search/paths/synonyms/saveSynonym.yml diff --git a/specs/paths/search_client/synonyms/searchSynonyms.yml b/specs/search/paths/synonyms/searchSynonyms.yml similarity index 100% rename from specs/paths/search_client/synonyms/searchSynonyms.yml rename to specs/search/paths/synonyms/searchSynonyms.yml diff --git a/specs/paths/search_client/vault/appendSource.yml b/specs/search/paths/vault/appendSource.yml similarity index 100% rename from specs/paths/search_client/vault/appendSource.yml rename to specs/search/paths/vault/appendSource.yml diff --git a/specs/paths/search_client/vault/deleteSource.yml b/specs/search/paths/vault/deleteSource.yml similarity index 100% rename from specs/paths/search_client/vault/deleteSource.yml rename to specs/search/paths/vault/deleteSource.yml diff --git a/specs/paths/search_client/vault/listSources.yml b/specs/search/paths/vault/listSources.yml similarity index 100% rename from specs/paths/search_client/vault/listSources.yml rename to specs/search/paths/vault/listSources.yml diff --git a/specs/paths/search_client/vault/replaceSources.yml b/specs/search/paths/vault/replaceSources.yml similarity index 100% rename from specs/paths/search_client/vault/replaceSources.yml rename to specs/search/paths/vault/replaceSources.yml diff --git a/specs/search/spec.yml b/specs/search/spec.yml new file mode 100644 index 0000000000..78f3d1bdc3 --- /dev/null +++ b/specs/search/spec.yml @@ -0,0 +1,178 @@ +openapi: 3.0.2 +info: + title: Search API + description: API powering the Search feature of Algolia. + version: 0.1.0 +components: + securitySchemes: + appId: + type: apiKey + in: header + name: X-Algolia-Application-Id + apiKey: + type: apiKey + in: header + name: X-Algolia-API-Key +security: + - appId: [] + apiKey: [] +paths: + # ######################## + # ### Search Endpoints ### + # ######################## + /1/indexes/{indexName}/query: + $ref: './paths/search/search.yml' + /1/indexes/*/queries: + $ref: './paths/search/multipleQueries.yml' + #/1/indexes/{indexName}/facets/{facetName}/query: + # $ref: './paths/search/searchForFacetValues.yml' + #/1/indexes/{indexName}/browse: + # $ref: './paths/search/browse.yml' + # + # ######################### + # ### Objects Endpoints ### + # ######################### + /1/indexes/{indexName}: + $ref: './paths/objects/saveObject.yml' + # /1/indexes/{indexName}/{objectID}: + # $ref: './paths/objects/updateObject.yml' + # /1/indexes/{indexName}/{objectID}: + # $ref: './paths/objects/deleteObject.yml' + # /1/indexes/{indexName}/deleteByQuery: + # $ref: './paths/objects/deleteBy.yml' + # /1/indexes/{indexName}/clear: + # $ref: './paths/objects/clearObjects.yml' + # /1/indexes/{indexName}/{objectID}/partial: + # $ref: './paths/objects/partialUpdate.yml' + /1/indexes/{indexName}/batch: + $ref: './paths/objects/batch.yml' + # /1/indexes/*/batch: + # $ref: './paths/objects/multipleBatch.yml' + # /1/indexes/*/objects: + # $ref: './paths/objects/multipleGetObjects.yml' + # /1/indexes/{indexName}/{objectID}: + # $ref: './paths/objects/getObject.yml' + # + # ########################## + # ### Settings Endpoints ### + # ########################## + # /1/indexes/{indexName}/settings: + # $ref: './paths/settings/getSettings.yml' + # /1/indexes/{indexName}/settings: + # $ref: './paths/settings/setSettings.yml' + # + # ################################ + # ### Manage Indices Endpoints ### + # ################################ + # /1/indexes/{indexName}: + # $ref: './paths/manage_indices/deleteIndex.yml' + # /1/indexes/{indexName}/operation: + # $ref: './paths/manage_indices/copyIndex.yml' + # /1/indexes: + # $ref: './paths/manage_indices/listIndices.yml' + # + # ########################## + # ### Synonyms Endpoints ### + # ########################## + # /1/indexes/{indexName}/synonyms/{objectID}: + # $ref: './paths/synonyms/saveSynonym.yml' + # /1/indexes/{indexName}/synonyms/batch: + # $ref: './paths/synonyms/batchSynonyms.yml' + # /1/indexes/{indexName}/synonyms/{objectID}: + # $ref: './paths/synonyms/getSynonym.yml' + # /1/indexes/{indexName}/synonyms/clear: + # $ref: './paths/synonyms/clearAllSynonyms.yml' + # /1/indexes/{indexName}/synonyms/{objectID}: + # $ref: './paths/synonyms/deleteSynonym.yml' + # /1/indexes/{indexName}/synonyms/search: + # $ref: './paths/synonyms/searchSynonyms.yml' + # + # ###################### + # ### Keys Endpoints ### + # ###################### + # /1/keys: + # $ref: './paths/keys/addApiKey.yml' + # /1/keys/{key}: + # $ref: './paths/keys/updateApiKey.yml' + # /1/keys: + # $ref: './paths/keys/listApiKeys.yml' + # /1/keys/{key}: + # $ref: './paths/keys/getApiKey.yml' + # /1/keys/{key}: + # $ref: './paths/keys/deleteApiKey.yml' + # /1/keys/{key}/restore: + # $ref: './paths/keys/restoreApiKey.yml' + # + # ####################### + # ### Rules Endpoints ### + # ####################### + # /1/indexes/{indexName}/rules/{objectID}: + # $ref: './paths/rules/saveRule.yml' + # /1/indexes/{indexName}/rules/batch: + # $ref: './paths/rules/batchRules.yml' + # /1/indexes/{indexName}/rules/{objectID}: + # $ref: './paths/rules/getRule.yml' + # /1/indexes/{indexName}/rules/{objectID}: + # $ref: './paths/rules/deleteRule.yml' + # /1/indexes/{indexName}/rules/clear: + # $ref: './paths/rules/clearRules.yml' + # /1/indexes/{indexName}/rules/search: + # $ref: './paths/rules/searchRules.yml' + # + # ############################## + # ### Dictionaries Endpoints ### + # ############################## + # /1/dictionaries/{dictionaryName}/batch: + # $ref: './paths/dictionaries/batchDictionaryEntries.yml' + # /1/dictionaries/{dictionaryName}/search: + # $ref: './paths/dictionaries/searchDictionaryEntries.yml' + # /1/dictionaries/*/settings: + # $ref: './paths/dictionaries/setDictionarySettings.yml' + # /1/dictionaries/*/settings: + # $ref: './paths/dictionaries/getDictionarySettings.yml' + # /1/dictionaries/*/languages: + # $ref: './paths/dictionaries/getDictionaryLanguages.yml' + # + # ############################### + # ### MultiClusters Endpoints ### + # ############################### + # /1/clusters/mapping: + # $ref: './paths/multiclusters/assignUserId.yml' + # /1/clusters/mapping/batch: + # $ref: './paths/multiclusters/batchAssignUserIds.yml' + # /1/clusters/mapping/top: + # $ref: './paths/multiclusters/getTopUserIds.yml' + # /1/clusters/mapping/${userID}: + # $ref: './paths/multiclusters/getUserId.yml' + # /1/clusters: + # $ref: './paths/multiclusters/listClusters.yml' + # /1/clusters/mapping: + # $ref: './paths/multiclusters/listUserIds.yml' + # /1/clusters/mapping/${userID}: + # $ref: './paths/multiclusters/removeUserId.yml' + # /1/clusters/mapping/search: + # $ref: './paths/multiclusters/searchUserIds.yml' + # /1/clusters/mapping/pending: + # $ref: './paths/multiclusters/hasPendingMappings.yml' + # + # ####################### + # ### Vault Endpoints ### + # ####################### + # /1/security/sources: + # $ref: './paths/vault/listSources.yml' + # /1/security/sources: + # $ref: './paths/vault/replaceSources.yml' + # /1/security/sources/append: + # $ref: './paths/vault/appendSource.yml' + # /1/security/sources/{source}: + # $ref: './paths/vault/deleteSource.yml' + # + # ########################## + # ### Advanced Endpoints ### + # ########################## + # /1/logs: + # $ref: './paths/advanced/getLogs.yml' + # /1/indexes/{indexName}/task/{taskID}: + # $ref: './paths/advanced/getTask.yml' + # /1/isalive: + # $ref: './paths/advanced/isAlive.yml' diff --git a/specs/spec_search.yml b/specs/spec_search.yml deleted file mode 100644 index d9ea450c0b..0000000000 --- a/specs/spec_search.yml +++ /dev/null @@ -1,178 +0,0 @@ -openapi: 3.0.2 -info: - title: Search API - description: API powering the Search feature of Algolia. - version: 0.1.0 -components: - securitySchemes: - appId: - type: apiKey - in: header - name: X-Algolia-Application-Id - apiKey: - type: apiKey - in: header - name: X-Algolia-API-Key -security: - - appId: [] - apiKey: [] -paths: - # ######################## - # ### Search Endpoints ### - # ######################## - /1/indexes/{indexName}/query: - $ref: './paths/search_client/search/search.yml' - /1/indexes/*/queries: - $ref: './paths/search_client/search/multipleQueries.yml' - #/1/indexes/{indexName}/facets/{facetName}/query: - # $ref: './paths/search_client/search/searchForFacetValues.yml' - #/1/indexes/{indexName}/browse: - # $ref: './paths/search_client/search/browse.yml' - # - # ######################### - # ### Objects Endpoints ### - # ######################### - /1/indexes/{indexName}: - $ref: './paths/search_client/objects/saveObject.yml' - # /1/indexes/{indexName}/{objectID}: - # $ref: './paths/search_client/objects/updateObject.yml' - # /1/indexes/{indexName}/{objectID}: - # $ref: './paths/search_client/objects/deleteObject.yml' - # /1/indexes/{indexName}/deleteByQuery: - # $ref: './paths/search_client/objects/deleteBy.yml' - # /1/indexes/{indexName}/clear: - # $ref: './paths/search_client/objects/clearObjects.yml' - # /1/indexes/{indexName}/{objectID}/partial: - # $ref: './paths/search_client/objects/partialUpdate.yml' - /1/indexes/{indexName}/batch: - $ref: './paths/search_client/objects/batch.yml' - # /1/indexes/*/batch: - # $ref: './paths/search_client/objects/multipleBatch.yml' - # /1/indexes/*/objects: - # $ref: './paths/search_client/objects/multipleGetObjects.yml' - # /1/indexes/{indexName}/{objectID}: - # $ref: './paths/search_client/objects/getObject.yml' - # - # ########################## - # ### Settings Endpoints ### - # ########################## - # /1/indexes/{indexName}/settings: - # $ref: './paths/search_client/settings/getSettings.yml' - # /1/indexes/{indexName}/settings: - # $ref: './paths/search_client/settings/setSettings.yml' - # - # ################################ - # ### Manage Indices Endpoints ### - # ################################ - # /1/indexes/{indexName}: - # $ref: './paths/search_client/manage_indices/deleteIndex.yml' - # /1/indexes/{indexName}/operation: - # $ref: './paths/search_client/manage_indices/copyIndex.yml' - # /1/indexes: - # $ref: './paths/search_client/manage_indices/listIndices.yml' - # - # ########################## - # ### Synonyms Endpoints ### - # ########################## - # /1/indexes/{indexName}/synonyms/{objectID}: - # $ref: './paths/search_client/synonyms/saveSynonym.yml' - # /1/indexes/{indexName}/synonyms/batch: - # $ref: './paths/search_client/synonyms/batchSynonyms.yml' - # /1/indexes/{indexName}/synonyms/{objectID}: - # $ref: './paths/search_client/synonyms/getSynonym.yml' - # /1/indexes/{indexName}/synonyms/clear: - # $ref: './paths/search_client/synonyms/clearAllSynonyms.yml' - # /1/indexes/{indexName}/synonyms/{objectID}: - # $ref: './paths/search_client/synonyms/deleteSynonym.yml' - # /1/indexes/{indexName}/synonyms/search: - # $ref: './paths/search_client/synonyms/searchSynonyms.yml' - # - # ###################### - # ### Keys Endpoints ### - # ###################### - # /1/keys: - # $ref: './paths/search_client/keys/addApiKey.yml' - # /1/keys/{key}: - # $ref: './paths/search_client/keys/updateApiKey.yml' - # /1/keys: - # $ref: './paths/search_client/keys/listApiKeys.yml' - # /1/keys/{key}: - # $ref: './paths/search_client/keys/getApiKey.yml' - # /1/keys/{key}: - # $ref: './paths/search_client/keys/deleteApiKey.yml' - # /1/keys/{key}/restore: - # $ref: './paths/search_client/keys/restoreApiKey.yml' - # - # ####################### - # ### Rules Endpoints ### - # ####################### - # /1/indexes/{indexName}/rules/{objectID}: - # $ref: './paths/search_client/rules/saveRule.yml' - # /1/indexes/{indexName}/rules/batch: - # $ref: './paths/search_client/rules/batchRules.yml' - # /1/indexes/{indexName}/rules/{objectID}: - # $ref: './paths/search_client/rules/getRule.yml' - # /1/indexes/{indexName}/rules/{objectID}: - # $ref: './paths/search_client/rules/deleteRule.yml' - # /1/indexes/{indexName}/rules/clear: - # $ref: './paths/search_client/rules/clearRules.yml' - # /1/indexes/{indexName}/rules/search: - # $ref: './paths/search_client/rules/searchRules.yml' - # - # ############################## - # ### Dictionaries Endpoints ### - # ############################## - # /1/dictionaries/{dictionaryName}/batch: - # $ref: './paths/search_client/dictionaries/batchDictionaryEntries.yml' - # /1/dictionaries/{dictionaryName}/search: - # $ref: './paths/search_client/dictionaries/searchDictionaryEntries.yml' - # /1/dictionaries/*/settings: - # $ref: './paths/search_client/dictionaries/setDictionarySettings.yml' - # /1/dictionaries/*/settings: - # $ref: './paths/search_client/dictionaries/getDictionarySettings.yml' - # /1/dictionaries/*/languages: - # $ref: './paths/search_client/dictionaries/getDictionaryLanguages.yml' - # - # ############################### - # ### MultiClusters Endpoints ### - # ############################### - # /1/clusters/mapping: - # $ref: './paths/search_client/multiclusters/assignUserId.yml' - # /1/clusters/mapping/batch: - # $ref: './paths/search_client/multiclusters/batchAssignUserIds.yml' - # /1/clusters/mapping/top: - # $ref: './paths/search_client/multiclusters/getTopUserIds.yml' - # /1/clusters/mapping/${userID}: - # $ref: './paths/search_client/multiclusters/getUserId.yml' - # /1/clusters: - # $ref: './paths/search_client/multiclusters/listClusters.yml' - # /1/clusters/mapping: - # $ref: './paths/search_client/multiclusters/listUserIds.yml' - # /1/clusters/mapping/${userID}: - # $ref: './paths/search_client/multiclusters/removeUserId.yml' - # /1/clusters/mapping/search: - # $ref: './paths/search_client/multiclusters/searchUserIds.yml' - # /1/clusters/mapping/pending: - # $ref: './paths/search_client/multiclusters/hasPendingMappings.yml' - # - # ####################### - # ### Vault Endpoints ### - # ####################### - # /1/security/sources: - # $ref: './paths/search_client/vault/listSources.yml' - # /1/security/sources: - # $ref: './paths/search_client/vault/replaceSources.yml' - # /1/security/sources/append: - # $ref: './paths/search_client/vault/appendSource.yml' - # /1/security/sources/{source}: - # $ref: './paths/search_client/vault/deleteSource.yml' - # - # ########################## - # ### Advanced Endpoints ### - # ########################## - # /1/logs: - # $ref: './paths/search_client/advanced/getLogs.yml' - # /1/indexes/{indexName}/task/{taskID}: - # $ref: './paths/search_client/advanced/getTask.yml' - # /1/isalive: - # $ref: './paths/search_client/advanced/isAlive.yml' From 929a5be8d875ac1d22d53f04f7d4f2403b3d8ceb Mon Sep 17 00:00:00 2001 From: Damien Couchez Date: Wed, 24 Nov 2021 16:29:21 +0100 Subject: [PATCH 06/10] feat: add insights and analytics clients --- .../click/getAverageTopClickPosition.yml | 1 + .../paths/click/getClickPositions.yml | 1 + .../paths/click/getClickThroughRate.yml | 1 + .../paths/click/getConversionRate.yml | 1 + .../paths/search/getAttributeTopFilters.yml | 1 + .../analytics/paths/search/getNoClickRate.yml | 1 + .../paths/search/getNoResultTopFilters.yml | 1 + .../paths/search/getNoResultsRate.yml | 1 + .../search/getSearchAttributesTopFilters.yml | 1 + .../paths/search/getSearchTopFilters.yml | 1 + .../paths/search/getSearchTopHits.yml | 1 + .../paths/search/getSearchesCount.yml | 1 + .../paths/search/getSearchesNoClicks.yml | 1 + .../paths/search/getSearchesNoResults.yml | 1 + .../paths/search/getTopCountries.yml | 1 + .../paths/search/getTopFilterAttributes.yml | 1 + specs/analytics/paths/search/getTopHits.yml | 1 + .../analytics/paths/search/getTopSearches.yml | 1 + .../analytics/paths/search/getUsersCount.yml | 1 + specs/analytics/paths/status/getStatus.yml | 1 + specs/analytics/spec.yml | 71 +++++++++++++++++++ specs/insights/paths/pushEvents.yml | 1 + specs/insights/spec.yml | 21 ++++++ 23 files changed, 113 insertions(+) create mode 100644 specs/analytics/paths/click/getAverageTopClickPosition.yml create mode 100644 specs/analytics/paths/click/getClickPositions.yml create mode 100644 specs/analytics/paths/click/getClickThroughRate.yml create mode 100644 specs/analytics/paths/click/getConversionRate.yml create mode 100644 specs/analytics/paths/search/getAttributeTopFilters.yml create mode 100644 specs/analytics/paths/search/getNoClickRate.yml create mode 100644 specs/analytics/paths/search/getNoResultTopFilters.yml create mode 100644 specs/analytics/paths/search/getNoResultsRate.yml create mode 100644 specs/analytics/paths/search/getSearchAttributesTopFilters.yml create mode 100644 specs/analytics/paths/search/getSearchTopFilters.yml create mode 100644 specs/analytics/paths/search/getSearchTopHits.yml create mode 100644 specs/analytics/paths/search/getSearchesCount.yml create mode 100644 specs/analytics/paths/search/getSearchesNoClicks.yml create mode 100644 specs/analytics/paths/search/getSearchesNoResults.yml create mode 100644 specs/analytics/paths/search/getTopCountries.yml create mode 100644 specs/analytics/paths/search/getTopFilterAttributes.yml create mode 100644 specs/analytics/paths/search/getTopHits.yml create mode 100644 specs/analytics/paths/search/getTopSearches.yml create mode 100644 specs/analytics/paths/search/getUsersCount.yml create mode 100644 specs/analytics/paths/status/getStatus.yml create mode 100644 specs/analytics/spec.yml create mode 100644 specs/insights/paths/pushEvents.yml create mode 100644 specs/insights/spec.yml diff --git a/specs/analytics/paths/click/getAverageTopClickPosition.yml b/specs/analytics/paths/click/getAverageTopClickPosition.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/click/getAverageTopClickPosition.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/click/getClickPositions.yml b/specs/analytics/paths/click/getClickPositions.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/click/getClickPositions.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/click/getClickThroughRate.yml b/specs/analytics/paths/click/getClickThroughRate.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/click/getClickThroughRate.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/click/getConversionRate.yml b/specs/analytics/paths/click/getConversionRate.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/click/getConversionRate.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getAttributeTopFilters.yml b/specs/analytics/paths/search/getAttributeTopFilters.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getAttributeTopFilters.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getNoClickRate.yml b/specs/analytics/paths/search/getNoClickRate.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getNoClickRate.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getNoResultTopFilters.yml b/specs/analytics/paths/search/getNoResultTopFilters.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getNoResultTopFilters.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getNoResultsRate.yml b/specs/analytics/paths/search/getNoResultsRate.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getNoResultsRate.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getSearchAttributesTopFilters.yml b/specs/analytics/paths/search/getSearchAttributesTopFilters.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getSearchAttributesTopFilters.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getSearchTopFilters.yml b/specs/analytics/paths/search/getSearchTopFilters.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getSearchTopFilters.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getSearchTopHits.yml b/specs/analytics/paths/search/getSearchTopHits.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getSearchTopHits.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getSearchesCount.yml b/specs/analytics/paths/search/getSearchesCount.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getSearchesCount.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getSearchesNoClicks.yml b/specs/analytics/paths/search/getSearchesNoClicks.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getSearchesNoClicks.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getSearchesNoResults.yml b/specs/analytics/paths/search/getSearchesNoResults.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getSearchesNoResults.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getTopCountries.yml b/specs/analytics/paths/search/getTopCountries.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getTopCountries.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getTopFilterAttributes.yml b/specs/analytics/paths/search/getTopFilterAttributes.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getTopFilterAttributes.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getTopHits.yml b/specs/analytics/paths/search/getTopHits.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getTopHits.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getTopSearches.yml b/specs/analytics/paths/search/getTopSearches.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getTopSearches.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/search/getUsersCount.yml b/specs/analytics/paths/search/getUsersCount.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/search/getUsersCount.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/paths/status/getStatus.yml b/specs/analytics/paths/status/getStatus.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/analytics/paths/status/getStatus.yml @@ -0,0 +1 @@ +get: diff --git a/specs/analytics/spec.yml b/specs/analytics/spec.yml new file mode 100644 index 0000000000..4c27a7d454 --- /dev/null +++ b/specs/analytics/spec.yml @@ -0,0 +1,71 @@ +openapi: 3.0.2 +info: + title: Analytics API + description: API powering the Analytics feature of Algolia. + version: 0.1.0 +components: + securitySchemes: + appId: + type: apiKey + in: header + name: X-Algolia-Application-Id + apiKey: + type: apiKey + in: header + name: X-Algolia-API-Key +security: + - appId: [] + apiKey: [] +paths: + # ######################## + # ### Status Endpoints ### + # ######################## + # /2/status: + # $ref: './paths/status/getStatus.yml' + # + # ################################## + # ### Search Analytics Endpoints ### + # ################################## + # /2/searches: + # $ref: './paths/search/getTopSearches.yml' + # /2/searches/count: + # $ref: './paths/search/getSearchesCount.yml' + # /2/searches/noResults: + # $ref: './paths/search/getSearchesNoResults.yml' + # /2/searches/noClicks: + # $ref: './paths/search/getSearchesNoClicks.yml' + # /2/searches/noResultRate: + # $ref: './paths/search/getNoResultsRate.yml' + # /2/searches/noClickRate: + # $ref: './paths/search/getNoClickRate.yml' + # /2/hits: + # $ref: './paths/search/getTopHits.yml' + # /2/hits?search=: + # $ref: './paths/search/getSearchTopHits.yml' + # /2/users/count: + # $ref: './paths/search/getUsersCount.yml' + # /2/filters: + # $ref: './paths/search/getTopFilterAttributes.yml' + # /2/filters/noResults?search=: + # $ref: './paths/search/getNoResultTopFilters.yml' + # /2/filters?search=: + # $ref: './paths/search/getSearchTopFilters.yml' + # /2/filters/{attribute list}?search=: + # $ref: './paths/search/getSearchAttributesTopFilters.yml' + # /2/filters/{attribute}: + # $ref: './paths/search/getAttributeTopFilters.yml' + # /2/countries: + # $ref: './paths/search/getTopCountries.yml' + # + # ################################# + # ### Click Analytics Endpoints ### + # ################################# + # /2/clicks/averageClickPosition: + # $ref: './paths/click/getAverageTopClickPosition.yml' + # /2/clicks/averageClickPosition: + # $ref: './paths/click/getClickPositions.yml' + # /2/clicks/averageClickPosition: + # $ref: './paths/click/getClickThroughRate.yml' + # /2/clicks/averageClickPosition: + # $ref: './paths/click/getConversionRate.yml' + diff --git a/specs/insights/paths/pushEvents.yml b/specs/insights/paths/pushEvents.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/insights/paths/pushEvents.yml @@ -0,0 +1 @@ +post: diff --git a/specs/insights/spec.yml b/specs/insights/spec.yml new file mode 100644 index 0000000000..3ee66c1138 --- /dev/null +++ b/specs/insights/spec.yml @@ -0,0 +1,21 @@ +openapi: 3.0.2 +info: + title: Insights API + description: API powering the Insights feature of Algolia. + version: 0.0.1 +components: + securitySchemes: + appId: + type: apiKey + in: header + name: X-Algolia-Application-Id + apiKey: + type: apiKey + in: header + name: X-Algolia-API-Key +security: + - appId: [] + apiKey: [] +paths: +# /1/events: +# $ref: './paths/pushEvents.yml' From 249a35c44fb6652baed994629a671ede091ec160 Mon Sep 17 00:00:00 2001 From: Damien Couchez Date: Wed, 24 Nov 2021 17:12:28 +0100 Subject: [PATCH 07/10] fix: move common files --- specs/analytics/spec.yml | 1 - specs/{search => }/common/parameters.yml | 0 specs/{search => }/common/responses/common.yml | 0 specs/{search => }/common/schemas/ErrorBase.yml | 0 specs/search/common/responses/BadRequest.yml | 2 +- specs/search/common/responses/IndexNotFound.yml | 2 +- specs/search/common/schemas/Record.yml | 2 +- specs/search/common/schemas/SearchResponse.yml | 4 ++-- specs/search/paths/objects/batch.yml | 6 +++--- specs/search/paths/objects/saveObject.yml | 6 +++--- specs/search/paths/search/search.yml | 2 +- 11 files changed, 12 insertions(+), 13 deletions(-) rename specs/{search => }/common/parameters.yml (100%) rename specs/{search => }/common/responses/common.yml (100%) rename specs/{search => }/common/schemas/ErrorBase.yml (100%) diff --git a/specs/analytics/spec.yml b/specs/analytics/spec.yml index 4c27a7d454..38d78c9c23 100644 --- a/specs/analytics/spec.yml +++ b/specs/analytics/spec.yml @@ -68,4 +68,3 @@ paths: # $ref: './paths/click/getClickThroughRate.yml' # /2/clicks/averageClickPosition: # $ref: './paths/click/getConversionRate.yml' - diff --git a/specs/search/common/parameters.yml b/specs/common/parameters.yml similarity index 100% rename from specs/search/common/parameters.yml rename to specs/common/parameters.yml diff --git a/specs/search/common/responses/common.yml b/specs/common/responses/common.yml similarity index 100% rename from specs/search/common/responses/common.yml rename to specs/common/responses/common.yml diff --git a/specs/search/common/schemas/ErrorBase.yml b/specs/common/schemas/ErrorBase.yml similarity index 100% rename from specs/search/common/schemas/ErrorBase.yml rename to specs/common/schemas/ErrorBase.yml diff --git a/specs/search/common/responses/BadRequest.yml b/specs/search/common/responses/BadRequest.yml index bd78840b4f..e5794d26f1 100644 --- a/specs/search/common/responses/BadRequest.yml +++ b/specs/search/common/responses/BadRequest.yml @@ -2,4 +2,4 @@ description: Bad request or request arguments content: application/json: schema: - $ref: '../schemas/ErrorBase.yml' + $ref: '../../../common/schemas/ErrorBase.yml' diff --git a/specs/search/common/responses/IndexNotFound.yml b/specs/search/common/responses/IndexNotFound.yml index a13beb85b1..1ba8607d12 100644 --- a/specs/search/common/responses/IndexNotFound.yml +++ b/specs/search/common/responses/IndexNotFound.yml @@ -2,4 +2,4 @@ description: Index not found content: application/json: schema: - $ref: '../schemas/ErrorBase.yml' + $ref: '../../../common/schemas/ErrorBase.yml' diff --git a/specs/search/common/schemas/Record.yml b/specs/search/common/schemas/Record.yml index 564ef9bc6c..9b8bada454 100644 --- a/specs/search/common/schemas/Record.yml +++ b/specs/search/common/schemas/Record.yml @@ -6,7 +6,7 @@ record: - objectID properties: objectID: - $ref: '../responses/common.yml#/objectID' + $ref: '../../../common/responses/common.yml#/objectID' _highlightResult: $ref: '#/highlightResult' _snippetResult: diff --git a/specs/search/common/schemas/SearchResponse.yml b/specs/search/common/schemas/SearchResponse.yml index ce5c41877d..996162a094 100644 --- a/specs/search/common/schemas/SearchResponse.yml +++ b/specs/search/common/schemas/SearchResponse.yml @@ -14,9 +14,9 @@ searchResponse: - params properties: abTestID: - $ref: ../responses/common.yml#/abTestID + $ref: ../../../common/responses/common.yml#/abTestID abTestVariantID: - $ref: ../responses/common.yml#/abTestVariantID + $ref: ../../../common/responses/common.yml#/abTestVariantID aroundLatLng: type: string description: The computed geo location. diff --git a/specs/search/paths/objects/batch.yml b/specs/search/paths/objects/batch.yml index e5e1de03e6..4eaa3d48d8 100644 --- a/specs/search/paths/objects/batch.yml +++ b/specs/search/paths/objects/batch.yml @@ -4,7 +4,7 @@ post: operationId: batch summary: Performs multiple write operations in a single API call parameters: - - $ref: '../../common/parameters.yml#/IndexName' + - $ref: '../../../common/parameters.yml#/IndexName' requestBody: required: true content: @@ -48,9 +48,9 @@ post: additionalProperties: false properties: taskID: - $ref: '../../common/responses/common.yml#/taskID' + $ref: '../../../common/responses/common.yml#/taskID' objectIDs: - $ref: '../../common/responses/common.yml#/objectIDs' + $ref: '../../../common/responses/common.yml#/objectIDs' '400': $ref: '../../common/responses/BadRequest.yml' '404': diff --git a/specs/search/paths/objects/saveObject.yml b/specs/search/paths/objects/saveObject.yml index 861cd426c8..17e98eafb3 100644 --- a/specs/search/paths/objects/saveObject.yml +++ b/specs/search/paths/objects/saveObject.yml @@ -5,7 +5,7 @@ post: summary: Save object description: Add an object to the index, automatically assigning it an object ID parameters: - - $ref: '../../common/parameters.yml#/IndexName' + - $ref: '../../../common/parameters.yml#/IndexName' requestBody: required: true content: @@ -26,9 +26,9 @@ post: createdAt: type: string taskID: - $ref: '../../common/responses/common.yml#/taskID' + $ref: '../../../common/responses/common.yml#/taskID' objectID: - $ref: '../../common/responses/common.yml#/objectID' + $ref: '../../../common/responses/common.yml#/objectID' '400': $ref: '../../common/responses/BadRequest.yml' '404': diff --git a/specs/search/paths/search/search.yml b/specs/search/paths/search/search.yml index 571a83aff3..0025493972 100644 --- a/specs/search/paths/search/search.yml +++ b/specs/search/paths/search/search.yml @@ -4,7 +4,7 @@ post: operationId: search summary: Get search results parameters: - - $ref: '../../common/parameters.yml#/IndexName' + - $ref: '../../../common/parameters.yml#/IndexName' requestBody: required: true content: From be62a6133de0031287c68b01b827bbdf10c6cad3 Mon Sep 17 00:00:00 2001 From: Damien Couchez Date: Thu, 25 Nov 2021 11:44:45 +0100 Subject: [PATCH 08/10] fix: merge multiple endpoints --- .../paths/abtest.yml} | 1 + .../paths/{addAbTest.yml => abtests.yml} | 1 + specs/abtesting/paths/listAbTests.yml | 1 - specs/abtesting/spec.yml | 18 ++---- .../paths/search/getTopFilterAttributes.yml | 1 + specs/analytics/paths/search/getTopHits.yml | 1 + specs/analytics/spec.yml | 22 +++---- specs/common/securitySchemes/common.yml | 8 +++ specs/insights/spec.yml | 12 ++-- .../paths/getPersonalizationStrategy.yml | 1 - ...rategy.yml => personalizationStrategy.yml} | 1 + specs/personalization/spec.yml | 16 ++--- .../paths/getAllConfigurations.yml | 1 - .../paths/getConfiguration.yml | 1 - specs/query_suggestions/paths/qsConfig.yml | 3 + ...{createConfiguration.yml => qsConfigs.yml} | 1 + .../paths/updateConfiguration.yml | 1 - specs/query_suggestions/spec.yml | 20 ++----- specs/recommend/spec.yml | 12 ++-- .../dictionaries/dictionarySettings.yml} | 1 + .../dictionaries/getDictionarySettings.yml | 1 - .../dictionaries/setDictionarySettings.yml | 1 - specs/search/paths/keys/getApiKey.yml | 1 - specs/search/paths/keys/key.yml | 3 + .../paths/keys/{addApiKey.yml => keys.yml} | 1 + specs/search/paths/keys/listApiKeys.yml | 1 - specs/search/paths/keys/updateApiKey.yml | 1 - .../paths/manage_indices/deleteIndex.yml | 1 - .../paths/multiclusters/assignUserId.yml | 1 - .../search/paths/multiclusters/getUserId.yml | 1 - .../paths/multiclusters/listUserIds.yml | 1 - .../paths/multiclusters/removeUserId.yml | 1 - .../paths/multiclusters/userId.yml} | 1 + specs/search/paths/multiclusters/userIds.yml | 2 + specs/search/paths/objects/deleteObject.yml | 1 - .../deleteApiKey.yml => objects/object.yml} | 1 + .../objects/{saveObject.yml => objects.yml} | 2 + specs/search/paths/objects/updateObject.yml | 1 - specs/search/paths/rules/deleteRule.yml | 1 - specs/search/paths/rules/getRule.yml | 1 - specs/search/paths/rules/rule.yml | 3 + specs/search/paths/rules/saveRule.yml | 1 - specs/search/paths/settings/getSettings.yml | 1 - specs/search/paths/settings/setSettings.yml | 1 - .../paths/settings/settings.yml} | 1 + specs/search/paths/synonyms/deleteSynonym.yml | 1 - specs/search/paths/synonyms/getSynonym.yml | 1 - specs/search/paths/synonyms/saveSynonym.yml | 1 - specs/search/paths/synonyms/synonym.yml | 3 + specs/search/paths/vault/listSources.yml | 1 - specs/search/paths/vault/replaceSources.yml | 1 - .../paths/vault/vaultSources.yml} | 1 + specs/search/spec.yml | 58 +++++-------------- 53 files changed, 79 insertions(+), 142 deletions(-) rename specs/{query_suggestions/paths/deleteConfiguration.yml => abtesting/paths/abtest.yml} (61%) rename specs/abtesting/paths/{addAbTest.yml => abtests.yml} (54%) delete mode 100644 specs/abtesting/paths/listAbTests.yml create mode 100644 specs/common/securitySchemes/common.yml delete mode 100644 specs/personalization/paths/getPersonalizationStrategy.yml rename specs/personalization/paths/{setPersonalizationStrategy.yml => personalizationStrategy.yml} (54%) delete mode 100644 specs/query_suggestions/paths/getAllConfigurations.yml delete mode 100644 specs/query_suggestions/paths/getConfiguration.yml create mode 100644 specs/query_suggestions/paths/qsConfig.yml rename specs/query_suggestions/paths/{createConfiguration.yml => qsConfigs.yml} (54%) delete mode 100644 specs/query_suggestions/paths/updateConfiguration.yml rename specs/{analytics/paths/search/getSearchTopFilters.yml => search/paths/dictionaries/dictionarySettings.yml} (50%) delete mode 100644 specs/search/paths/dictionaries/getDictionarySettings.yml delete mode 100644 specs/search/paths/dictionaries/setDictionarySettings.yml delete mode 100644 specs/search/paths/keys/getApiKey.yml create mode 100644 specs/search/paths/keys/key.yml rename specs/search/paths/keys/{addApiKey.yml => keys.yml} (54%) delete mode 100644 specs/search/paths/keys/listApiKeys.yml delete mode 100644 specs/search/paths/keys/updateApiKey.yml delete mode 100644 specs/search/paths/manage_indices/deleteIndex.yml delete mode 100644 specs/search/paths/multiclusters/assignUserId.yml delete mode 100644 specs/search/paths/multiclusters/getUserId.yml delete mode 100644 specs/search/paths/multiclusters/listUserIds.yml delete mode 100644 specs/search/paths/multiclusters/removeUserId.yml rename specs/{abtesting/paths/deleteAbTest.yml => search/paths/multiclusters/userId.yml} (61%) create mode 100644 specs/search/paths/multiclusters/userIds.yml delete mode 100644 specs/search/paths/objects/deleteObject.yml rename specs/search/paths/{keys/deleteApiKey.yml => objects/object.yml} (61%) rename specs/search/paths/objects/{saveObject.yml => objects.yml} (97%) delete mode 100644 specs/search/paths/objects/updateObject.yml delete mode 100644 specs/search/paths/rules/deleteRule.yml delete mode 100644 specs/search/paths/rules/getRule.yml create mode 100644 specs/search/paths/rules/rule.yml delete mode 100644 specs/search/paths/rules/saveRule.yml delete mode 100644 specs/search/paths/settings/getSettings.yml delete mode 100644 specs/search/paths/settings/setSettings.yml rename specs/{analytics/paths/search/getSearchTopHits.yml => search/paths/settings/settings.yml} (50%) delete mode 100644 specs/search/paths/synonyms/deleteSynonym.yml delete mode 100644 specs/search/paths/synonyms/getSynonym.yml delete mode 100644 specs/search/paths/synonyms/saveSynonym.yml create mode 100644 specs/search/paths/synonyms/synonym.yml delete mode 100644 specs/search/paths/vault/listSources.yml delete mode 100644 specs/search/paths/vault/replaceSources.yml rename specs/{abtesting/paths/getAbTest.yml => search/paths/vault/vaultSources.yml} (50%) diff --git a/specs/query_suggestions/paths/deleteConfiguration.yml b/specs/abtesting/paths/abtest.yml similarity index 61% rename from specs/query_suggestions/paths/deleteConfiguration.yml rename to specs/abtesting/paths/abtest.yml index ac5790e8f8..4a95117692 100644 --- a/specs/query_suggestions/paths/deleteConfiguration.yml +++ b/specs/abtesting/paths/abtest.yml @@ -1 +1,2 @@ +get: delete: diff --git a/specs/abtesting/paths/addAbTest.yml b/specs/abtesting/paths/abtests.yml similarity index 54% rename from specs/abtesting/paths/addAbTest.yml rename to specs/abtesting/paths/abtests.yml index 6adb517bf4..9791372547 100644 --- a/specs/abtesting/paths/addAbTest.yml +++ b/specs/abtesting/paths/abtests.yml @@ -1 +1,2 @@ post: +get: diff --git a/specs/abtesting/paths/listAbTests.yml b/specs/abtesting/paths/listAbTests.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/abtesting/paths/listAbTests.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/abtesting/spec.yml b/specs/abtesting/spec.yml index 3274d6b651..830feebb03 100644 --- a/specs/abtesting/spec.yml +++ b/specs/abtesting/spec.yml @@ -6,24 +6,16 @@ info: components: securitySchemes: appId: - type: apiKey - in: header - name: X-Algolia-Application-Id + $ref: '../common/securitySchemes/common.yml#/appId' apiKey: - type: apiKey - in: header - name: X-Algolia-API-Key + $ref: '../common/securitySchemes/common.yml#/apiKey' security: - appId: [] apiKey: [] paths: -# /2/abtests: -# $ref: './paths/addAbTest.yml' + /2/abtests: + $ref: './paths/abtests.yml' # /2/abtests/{id}: -# $ref: './paths/getAbTest.yml' -# /2/abtests: -# $ref: './paths/listAbTests.yml' +# $ref: './paths/abtest.yml' # /2/abtests/{id}/stop: # $ref: './paths/stopAbTest.yml' -# /2/abtests/{id}: -# $ref: './paths/deleteAbTest.yml' diff --git a/specs/analytics/paths/search/getTopFilterAttributes.yml b/specs/analytics/paths/search/getTopFilterAttributes.yml index 3ddb9d7f54..e012e7acb5 100644 --- a/specs/analytics/paths/search/getTopFilterAttributes.yml +++ b/specs/analytics/paths/search/getTopFilterAttributes.yml @@ -1 +1,2 @@ get: +# handle /2/filters?search= as well diff --git a/specs/analytics/paths/search/getTopHits.yml b/specs/analytics/paths/search/getTopHits.yml index 3ddb9d7f54..e92c2b1912 100644 --- a/specs/analytics/paths/search/getTopHits.yml +++ b/specs/analytics/paths/search/getTopHits.yml @@ -1 +1,2 @@ get: +# handle /2/hits?search= as well diff --git a/specs/analytics/spec.yml b/specs/analytics/spec.yml index 38d78c9c23..e4949ef4e7 100644 --- a/specs/analytics/spec.yml +++ b/specs/analytics/spec.yml @@ -6,13 +6,9 @@ info: components: securitySchemes: appId: - type: apiKey - in: header - name: X-Algolia-Application-Id + $ref: '../common/securitySchemes/common.yml#/appId' apiKey: - type: apiKey - in: header - name: X-Algolia-API-Key + $ref: '../common/securitySchemes/common.yml#/apiKey' security: - appId: [] apiKey: [] @@ -20,8 +16,8 @@ paths: # ######################## # ### Status Endpoints ### # ######################## - # /2/status: - # $ref: './paths/status/getStatus.yml' + /2/status: + $ref: './paths/status/getStatus.yml' # # ################################## # ### Search Analytics Endpoints ### @@ -40,16 +36,12 @@ paths: # $ref: './paths/search/getNoClickRate.yml' # /2/hits: # $ref: './paths/search/getTopHits.yml' - # /2/hits?search=: - # $ref: './paths/search/getSearchTopHits.yml' # /2/users/count: # $ref: './paths/search/getUsersCount.yml' # /2/filters: # $ref: './paths/search/getTopFilterAttributes.yml' # /2/filters/noResults?search=: # $ref: './paths/search/getNoResultTopFilters.yml' - # /2/filters?search=: - # $ref: './paths/search/getSearchTopFilters.yml' # /2/filters/{attribute list}?search=: # $ref: './paths/search/getSearchAttributesTopFilters.yml' # /2/filters/{attribute}: @@ -62,9 +54,9 @@ paths: # ################################# # /2/clicks/averageClickPosition: # $ref: './paths/click/getAverageTopClickPosition.yml' - # /2/clicks/averageClickPosition: + # /2/clicks/positions: # $ref: './paths/click/getClickPositions.yml' - # /2/clicks/averageClickPosition: + # /2/clicks/clickThroughRate: # $ref: './paths/click/getClickThroughRate.yml' - # /2/clicks/averageClickPosition: + # /2/conversions/conversionRate: # $ref: './paths/click/getConversionRate.yml' diff --git a/specs/common/securitySchemes/common.yml b/specs/common/securitySchemes/common.yml new file mode 100644 index 0000000000..211d837fa7 --- /dev/null +++ b/specs/common/securitySchemes/common.yml @@ -0,0 +1,8 @@ +appId: + type: apiKey + in: header + name: X-Algolia-Application-Id +apiKey: + type: apiKey + in: header + name: X-Algolia-API-Key diff --git a/specs/insights/spec.yml b/specs/insights/spec.yml index 3ee66c1138..7671ea6be2 100644 --- a/specs/insights/spec.yml +++ b/specs/insights/spec.yml @@ -6,16 +6,12 @@ info: components: securitySchemes: appId: - type: apiKey - in: header - name: X-Algolia-Application-Id + $ref: '../common/securitySchemes/common.yml#/appId' apiKey: - type: apiKey - in: header - name: X-Algolia-API-Key + $ref: '../common/securitySchemes/common.yml#/apiKey' security: - appId: [] apiKey: [] paths: -# /1/events: -# $ref: './paths/pushEvents.yml' + /1/events: + $ref: './paths/pushEvents.yml' diff --git a/specs/personalization/paths/getPersonalizationStrategy.yml b/specs/personalization/paths/getPersonalizationStrategy.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/personalization/paths/getPersonalizationStrategy.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/personalization/paths/setPersonalizationStrategy.yml b/specs/personalization/paths/personalizationStrategy.yml similarity index 54% rename from specs/personalization/paths/setPersonalizationStrategy.yml rename to specs/personalization/paths/personalizationStrategy.yml index 6adb517bf4..9791372547 100644 --- a/specs/personalization/paths/setPersonalizationStrategy.yml +++ b/specs/personalization/paths/personalizationStrategy.yml @@ -1 +1,2 @@ post: +get: diff --git a/specs/personalization/spec.yml b/specs/personalization/spec.yml index 236a433076..2f94987c90 100644 --- a/specs/personalization/spec.yml +++ b/specs/personalization/spec.yml @@ -6,22 +6,16 @@ info: components: securitySchemes: appId: - type: apiKey - in: header - name: X-Algolia-Application-Id + $ref: '../common/securitySchemes/common.yml#/appId' apiKey: - type: apiKey - in: header - name: X-Algolia-API-Key + $ref: '../common/securitySchemes/common.yml#/apiKey' security: - appId: [] apiKey: [] paths: -# /1/profiles/personalization/{userToken}: -# $ref: './paths/getUserTokenProfile.yml' + /1/profiles/personalization/{userToken}: + $ref: './paths/getUserTokenProfile.yml' # /1/profiles/{userToken}: # $ref: './paths/deleteUserProfile.yml' # /1/strategies/personalization: -# $ref: './paths/getPersonalizationStrategy.yml' -# /1/strategies/personalization: -# $ref: './paths/setPersonalizationStrategy.yml' +# $ref: './paths/personalizationStrategy.yml' diff --git a/specs/query_suggestions/paths/getAllConfigurations.yml b/specs/query_suggestions/paths/getAllConfigurations.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/query_suggestions/paths/getAllConfigurations.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/query_suggestions/paths/getConfiguration.yml b/specs/query_suggestions/paths/getConfiguration.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/query_suggestions/paths/getConfiguration.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/query_suggestions/paths/qsConfig.yml b/specs/query_suggestions/paths/qsConfig.yml new file mode 100644 index 0000000000..4428e7d0ea --- /dev/null +++ b/specs/query_suggestions/paths/qsConfig.yml @@ -0,0 +1,3 @@ +put: +delete: +get: diff --git a/specs/query_suggestions/paths/createConfiguration.yml b/specs/query_suggestions/paths/qsConfigs.yml similarity index 54% rename from specs/query_suggestions/paths/createConfiguration.yml rename to specs/query_suggestions/paths/qsConfigs.yml index 6adb517bf4..9791372547 100644 --- a/specs/query_suggestions/paths/createConfiguration.yml +++ b/specs/query_suggestions/paths/qsConfigs.yml @@ -1 +1,2 @@ post: +get: diff --git a/specs/query_suggestions/paths/updateConfiguration.yml b/specs/query_suggestions/paths/updateConfiguration.yml deleted file mode 100644 index 3df014f84e..0000000000 --- a/specs/query_suggestions/paths/updateConfiguration.yml +++ /dev/null @@ -1 +0,0 @@ -put: diff --git a/specs/query_suggestions/spec.yml b/specs/query_suggestions/spec.yml index 555e1d8812..75200c2dc6 100644 --- a/specs/query_suggestions/spec.yml +++ b/specs/query_suggestions/spec.yml @@ -6,28 +6,18 @@ info: components: securitySchemes: appId: - type: apiKey - in: header - name: X-Algolia-Application-Id + $ref: '../common/securitySchemes/common.yml#/appId' apiKey: - type: apiKey - in: header - name: X-Algolia-API-Key + $ref: '../common/securitySchemes/common.yml#/apiKey' security: - appId: [] apiKey: [] paths: -# /1/configs: -# $ref: './paths/createConfiguration.yml' + /1/configs: + $ref: './paths/qsConfigs.yml' # /1/configs/{indexName}: -# $ref: './paths/updateConfiguration.yml' -# /1/configs/{indexName}: -# $ref: './paths/deleteConfiguration.yml' -# /1/configs/{indexName}: -# $ref: './paths/getConfiguration.yml' +# $ref: './paths/qsConfig.yml' # /1/configs/{indexName}/status: # $ref: './paths/getConfigurationStatus.yml' -# /1/configs: -# $ref: './paths/getAllConfigurations.yml' # /1/logs/{indexName}: # $ref: './paths/getLogFile.yml' diff --git a/specs/recommend/spec.yml b/specs/recommend/spec.yml index 8b6ab42377..2e50c62db1 100644 --- a/specs/recommend/spec.yml +++ b/specs/recommend/spec.yml @@ -6,16 +6,12 @@ info: components: securitySchemes: appId: - type: apiKey - in: header - name: X-Algolia-Application-Id + $ref: '../common/securitySchemes/common.yml#/appId' apiKey: - type: apiKey - in: header - name: X-Algolia-API-Key + $ref: '../common/securitySchemes/common.yml#/apiKey' security: - appId: [] apiKey: [] paths: -# /1/indexes/*/recommendations: -# $ref: './paths/getRecommendations.yml' + /1/indexes/*/recommendations: + $ref: './paths/getRecommendations.yml' diff --git a/specs/analytics/paths/search/getSearchTopFilters.yml b/specs/search/paths/dictionaries/dictionarySettings.yml similarity index 50% rename from specs/analytics/paths/search/getSearchTopFilters.yml rename to specs/search/paths/dictionaries/dictionarySettings.yml index 3ddb9d7f54..6652915bd0 100644 --- a/specs/analytics/paths/search/getSearchTopFilters.yml +++ b/specs/search/paths/dictionaries/dictionarySettings.yml @@ -1 +1,2 @@ +put: get: diff --git a/specs/search/paths/dictionaries/getDictionarySettings.yml b/specs/search/paths/dictionaries/getDictionarySettings.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/search/paths/dictionaries/getDictionarySettings.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/search/paths/dictionaries/setDictionarySettings.yml b/specs/search/paths/dictionaries/setDictionarySettings.yml deleted file mode 100644 index 3df014f84e..0000000000 --- a/specs/search/paths/dictionaries/setDictionarySettings.yml +++ /dev/null @@ -1 +0,0 @@ -put: diff --git a/specs/search/paths/keys/getApiKey.yml b/specs/search/paths/keys/getApiKey.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/search/paths/keys/getApiKey.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/search/paths/keys/key.yml b/specs/search/paths/keys/key.yml new file mode 100644 index 0000000000..9157e5af9a --- /dev/null +++ b/specs/search/paths/keys/key.yml @@ -0,0 +1,3 @@ +put: +get: +delete: diff --git a/specs/search/paths/keys/addApiKey.yml b/specs/search/paths/keys/keys.yml similarity index 54% rename from specs/search/paths/keys/addApiKey.yml rename to specs/search/paths/keys/keys.yml index 6adb517bf4..9791372547 100644 --- a/specs/search/paths/keys/addApiKey.yml +++ b/specs/search/paths/keys/keys.yml @@ -1 +1,2 @@ post: +get: diff --git a/specs/search/paths/keys/listApiKeys.yml b/specs/search/paths/keys/listApiKeys.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/search/paths/keys/listApiKeys.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/search/paths/keys/updateApiKey.yml b/specs/search/paths/keys/updateApiKey.yml deleted file mode 100644 index 3df014f84e..0000000000 --- a/specs/search/paths/keys/updateApiKey.yml +++ /dev/null @@ -1 +0,0 @@ -put: diff --git a/specs/search/paths/manage_indices/deleteIndex.yml b/specs/search/paths/manage_indices/deleteIndex.yml deleted file mode 100644 index ac5790e8f8..0000000000 --- a/specs/search/paths/manage_indices/deleteIndex.yml +++ /dev/null @@ -1 +0,0 @@ -delete: diff --git a/specs/search/paths/multiclusters/assignUserId.yml b/specs/search/paths/multiclusters/assignUserId.yml deleted file mode 100644 index 6adb517bf4..0000000000 --- a/specs/search/paths/multiclusters/assignUserId.yml +++ /dev/null @@ -1 +0,0 @@ -post: diff --git a/specs/search/paths/multiclusters/getUserId.yml b/specs/search/paths/multiclusters/getUserId.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/search/paths/multiclusters/getUserId.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/search/paths/multiclusters/listUserIds.yml b/specs/search/paths/multiclusters/listUserIds.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/search/paths/multiclusters/listUserIds.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/search/paths/multiclusters/removeUserId.yml b/specs/search/paths/multiclusters/removeUserId.yml deleted file mode 100644 index ac5790e8f8..0000000000 --- a/specs/search/paths/multiclusters/removeUserId.yml +++ /dev/null @@ -1 +0,0 @@ -delete: diff --git a/specs/abtesting/paths/deleteAbTest.yml b/specs/search/paths/multiclusters/userId.yml similarity index 61% rename from specs/abtesting/paths/deleteAbTest.yml rename to specs/search/paths/multiclusters/userId.yml index ac5790e8f8..4a95117692 100644 --- a/specs/abtesting/paths/deleteAbTest.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -1 +1,2 @@ +get: delete: diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml new file mode 100644 index 0000000000..9791372547 --- /dev/null +++ b/specs/search/paths/multiclusters/userIds.yml @@ -0,0 +1,2 @@ +post: +get: diff --git a/specs/search/paths/objects/deleteObject.yml b/specs/search/paths/objects/deleteObject.yml deleted file mode 100644 index ac5790e8f8..0000000000 --- a/specs/search/paths/objects/deleteObject.yml +++ /dev/null @@ -1 +0,0 @@ -delete: diff --git a/specs/search/paths/keys/deleteApiKey.yml b/specs/search/paths/objects/object.yml similarity index 61% rename from specs/search/paths/keys/deleteApiKey.yml rename to specs/search/paths/objects/object.yml index ac5790e8f8..240422df80 100644 --- a/specs/search/paths/keys/deleteApiKey.yml +++ b/specs/search/paths/objects/object.yml @@ -1 +1,2 @@ +put: delete: diff --git a/specs/search/paths/objects/saveObject.yml b/specs/search/paths/objects/objects.yml similarity index 97% rename from specs/search/paths/objects/saveObject.yml rename to specs/search/paths/objects/objects.yml index 17e98eafb3..a36130275c 100644 --- a/specs/search/paths/objects/saveObject.yml +++ b/specs/search/paths/objects/objects.yml @@ -33,3 +33,5 @@ post: $ref: '../../common/responses/BadRequest.yml' '404': $ref: '../../common/responses/IndexNotFound.yml' +#delete index +# delete: diff --git a/specs/search/paths/objects/updateObject.yml b/specs/search/paths/objects/updateObject.yml deleted file mode 100644 index 3df014f84e..0000000000 --- a/specs/search/paths/objects/updateObject.yml +++ /dev/null @@ -1 +0,0 @@ -put: diff --git a/specs/search/paths/rules/deleteRule.yml b/specs/search/paths/rules/deleteRule.yml deleted file mode 100644 index ac5790e8f8..0000000000 --- a/specs/search/paths/rules/deleteRule.yml +++ /dev/null @@ -1 +0,0 @@ -delete: diff --git a/specs/search/paths/rules/getRule.yml b/specs/search/paths/rules/getRule.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/search/paths/rules/getRule.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/search/paths/rules/rule.yml b/specs/search/paths/rules/rule.yml new file mode 100644 index 0000000000..9157e5af9a --- /dev/null +++ b/specs/search/paths/rules/rule.yml @@ -0,0 +1,3 @@ +put: +get: +delete: diff --git a/specs/search/paths/rules/saveRule.yml b/specs/search/paths/rules/saveRule.yml deleted file mode 100644 index 3df014f84e..0000000000 --- a/specs/search/paths/rules/saveRule.yml +++ /dev/null @@ -1 +0,0 @@ -put: diff --git a/specs/search/paths/settings/getSettings.yml b/specs/search/paths/settings/getSettings.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/search/paths/settings/getSettings.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/search/paths/settings/setSettings.yml b/specs/search/paths/settings/setSettings.yml deleted file mode 100644 index 3df014f84e..0000000000 --- a/specs/search/paths/settings/setSettings.yml +++ /dev/null @@ -1 +0,0 @@ -put: diff --git a/specs/analytics/paths/search/getSearchTopHits.yml b/specs/search/paths/settings/settings.yml similarity index 50% rename from specs/analytics/paths/search/getSearchTopHits.yml rename to specs/search/paths/settings/settings.yml index 3ddb9d7f54..7f2769e14e 100644 --- a/specs/analytics/paths/search/getSearchTopHits.yml +++ b/specs/search/paths/settings/settings.yml @@ -1 +1,2 @@ get: +put: diff --git a/specs/search/paths/synonyms/deleteSynonym.yml b/specs/search/paths/synonyms/deleteSynonym.yml deleted file mode 100644 index ac5790e8f8..0000000000 --- a/specs/search/paths/synonyms/deleteSynonym.yml +++ /dev/null @@ -1 +0,0 @@ -delete: diff --git a/specs/search/paths/synonyms/getSynonym.yml b/specs/search/paths/synonyms/getSynonym.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/search/paths/synonyms/getSynonym.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/search/paths/synonyms/saveSynonym.yml b/specs/search/paths/synonyms/saveSynonym.yml deleted file mode 100644 index 3df014f84e..0000000000 --- a/specs/search/paths/synonyms/saveSynonym.yml +++ /dev/null @@ -1 +0,0 @@ -put: diff --git a/specs/search/paths/synonyms/synonym.yml b/specs/search/paths/synonyms/synonym.yml new file mode 100644 index 0000000000..9157e5af9a --- /dev/null +++ b/specs/search/paths/synonyms/synonym.yml @@ -0,0 +1,3 @@ +put: +get: +delete: diff --git a/specs/search/paths/vault/listSources.yml b/specs/search/paths/vault/listSources.yml deleted file mode 100644 index 3ddb9d7f54..0000000000 --- a/specs/search/paths/vault/listSources.yml +++ /dev/null @@ -1 +0,0 @@ -get: diff --git a/specs/search/paths/vault/replaceSources.yml b/specs/search/paths/vault/replaceSources.yml deleted file mode 100644 index 3df014f84e..0000000000 --- a/specs/search/paths/vault/replaceSources.yml +++ /dev/null @@ -1 +0,0 @@ -put: diff --git a/specs/abtesting/paths/getAbTest.yml b/specs/search/paths/vault/vaultSources.yml similarity index 50% rename from specs/abtesting/paths/getAbTest.yml rename to specs/search/paths/vault/vaultSources.yml index 3ddb9d7f54..7f2769e14e 100644 --- a/specs/abtesting/paths/getAbTest.yml +++ b/specs/search/paths/vault/vaultSources.yml @@ -1 +1,2 @@ get: +put: diff --git a/specs/search/spec.yml b/specs/search/spec.yml index 78f3d1bdc3..b99160f645 100644 --- a/specs/search/spec.yml +++ b/specs/search/spec.yml @@ -6,13 +6,9 @@ info: components: securitySchemes: appId: - type: apiKey - in: header - name: X-Algolia-Application-Id + $ref: '../common/securitySchemes/common.yml#/appId' apiKey: - type: apiKey - in: header - name: X-Algolia-API-Key + $ref: '../common/securitySchemes/common.yml#/apiKey' security: - appId: [] apiKey: [] @@ -33,11 +29,9 @@ paths: # ### Objects Endpoints ### # ######################### /1/indexes/{indexName}: - $ref: './paths/objects/saveObject.yml' + $ref: './paths/objects/objects.yml' # /1/indexes/{indexName}/{objectID}: - # $ref: './paths/objects/updateObject.yml' - # /1/indexes/{indexName}/{objectID}: - # $ref: './paths/objects/deleteObject.yml' + # $ref: './paths/objects/object.yml' # /1/indexes/{indexName}/deleteByQuery: # $ref: './paths/objects/deleteBy.yml' # /1/indexes/{indexName}/clear: @@ -57,15 +51,11 @@ paths: # ### Settings Endpoints ### # ########################## # /1/indexes/{indexName}/settings: - # $ref: './paths/settings/getSettings.yml' - # /1/indexes/{indexName}/settings: - # $ref: './paths/settings/setSettings.yml' + # $ref: './paths/settings/settings.yml' # # ################################ # ### Manage Indices Endpoints ### # ################################ - # /1/indexes/{indexName}: - # $ref: './paths/manage_indices/deleteIndex.yml' # /1/indexes/{indexName}/operation: # $ref: './paths/manage_indices/copyIndex.yml' # /1/indexes: @@ -75,15 +65,11 @@ paths: # ### Synonyms Endpoints ### # ########################## # /1/indexes/{indexName}/synonyms/{objectID}: - # $ref: './paths/synonyms/saveSynonym.yml' + # $ref: './paths/synonyms/synonym.yml' # /1/indexes/{indexName}/synonyms/batch: # $ref: './paths/synonyms/batchSynonyms.yml' - # /1/indexes/{indexName}/synonyms/{objectID}: - # $ref: './paths/synonyms/getSynonym.yml' # /1/indexes/{indexName}/synonyms/clear: # $ref: './paths/synonyms/clearAllSynonyms.yml' - # /1/indexes/{indexName}/synonyms/{objectID}: - # $ref: './paths/synonyms/deleteSynonym.yml' # /1/indexes/{indexName}/synonyms/search: # $ref: './paths/synonyms/searchSynonyms.yml' # @@ -91,15 +77,9 @@ paths: # ### Keys Endpoints ### # ###################### # /1/keys: - # $ref: './paths/keys/addApiKey.yml' - # /1/keys/{key}: - # $ref: './paths/keys/updateApiKey.yml' - # /1/keys: - # $ref: './paths/keys/listApiKeys.yml' - # /1/keys/{key}: - # $ref: './paths/keys/getApiKey.yml' + # $ref: './paths/keys/keys.yml' # /1/keys/{key}: - # $ref: './paths/keys/deleteApiKey.yml' + # $ref: './paths/keys/key.yml' # /1/keys/{key}/restore: # $ref: './paths/keys/restoreApiKey.yml' # @@ -107,13 +87,9 @@ paths: # ### Rules Endpoints ### # ####################### # /1/indexes/{indexName}/rules/{objectID}: - # $ref: './paths/rules/saveRule.yml' + # $ref: './paths/rules/rule.yml' # /1/indexes/{indexName}/rules/batch: # $ref: './paths/rules/batchRules.yml' - # /1/indexes/{indexName}/rules/{objectID}: - # $ref: './paths/rules/getRule.yml' - # /1/indexes/{indexName}/rules/{objectID}: - # $ref: './paths/rules/deleteRule.yml' # /1/indexes/{indexName}/rules/clear: # $ref: './paths/rules/clearRules.yml' # /1/indexes/{indexName}/rules/search: @@ -127,9 +103,7 @@ paths: # /1/dictionaries/{dictionaryName}/search: # $ref: './paths/dictionaries/searchDictionaryEntries.yml' # /1/dictionaries/*/settings: - # $ref: './paths/dictionaries/setDictionarySettings.yml' - # /1/dictionaries/*/settings: - # $ref: './paths/dictionaries/getDictionarySettings.yml' + # $ref: './paths/dictionaries/dictionarySettings.yml' # /1/dictionaries/*/languages: # $ref: './paths/dictionaries/getDictionaryLanguages.yml' # @@ -137,19 +111,15 @@ paths: # ### MultiClusters Endpoints ### # ############################### # /1/clusters/mapping: - # $ref: './paths/multiclusters/assignUserId.yml' + # $ref: './paths/multiclusters/userIds.yml' # /1/clusters/mapping/batch: # $ref: './paths/multiclusters/batchAssignUserIds.yml' # /1/clusters/mapping/top: # $ref: './paths/multiclusters/getTopUserIds.yml' # /1/clusters/mapping/${userID}: - # $ref: './paths/multiclusters/getUserId.yml' + # $ref: './paths/multiclusters/userId.yml' # /1/clusters: # $ref: './paths/multiclusters/listClusters.yml' - # /1/clusters/mapping: - # $ref: './paths/multiclusters/listUserIds.yml' - # /1/clusters/mapping/${userID}: - # $ref: './paths/multiclusters/removeUserId.yml' # /1/clusters/mapping/search: # $ref: './paths/multiclusters/searchUserIds.yml' # /1/clusters/mapping/pending: @@ -159,9 +129,7 @@ paths: # ### Vault Endpoints ### # ####################### # /1/security/sources: - # $ref: './paths/vault/listSources.yml' - # /1/security/sources: - # $ref: './paths/vault/replaceSources.yml' + # $ref: './paths/vault/vaultSources.yml' # /1/security/sources/append: # $ref: './paths/vault/appendSource.yml' # /1/security/sources/{source}: From 910fdc70dd4fbd66b2b48dd8026a08d40dab9ffc Mon Sep 17 00:00:00 2001 From: Damien Couchez Date: Thu, 25 Nov 2021 14:43:52 +0100 Subject: [PATCH 09/10] fix: cluster endpoint --- specs/search/spec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/search/spec.yml b/specs/search/spec.yml index b99160f645..a5df13e226 100644 --- a/specs/search/spec.yml +++ b/specs/search/spec.yml @@ -116,7 +116,7 @@ paths: # $ref: './paths/multiclusters/batchAssignUserIds.yml' # /1/clusters/mapping/top: # $ref: './paths/multiclusters/getTopUserIds.yml' - # /1/clusters/mapping/${userID}: + # /1/clusters/mapping/{userID}: # $ref: './paths/multiclusters/userId.yml' # /1/clusters: # $ref: './paths/multiclusters/listClusters.yml' From b4f8f1d68d7e5c1984d81610178d7ea781ff84c9 Mon Sep 17 00:00:00 2001 From: Damien Couchez Date: Thu, 25 Nov 2021 14:50:01 +0100 Subject: [PATCH 10/10] fix: put securityScheme in a file --- specs/abtesting/spec.yml | 4 ++-- specs/analytics/spec.yml | 4 ++-- .../{securitySchemes/common.yml => securitySchemes.yml} | 0 specs/insights/spec.yml | 4 ++-- specs/personalization/spec.yml | 4 ++-- specs/query_suggestions/spec.yml | 4 ++-- specs/recommend/spec.yml | 4 ++-- specs/search/spec.yml | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) rename specs/common/{securitySchemes/common.yml => securitySchemes.yml} (100%) diff --git a/specs/abtesting/spec.yml b/specs/abtesting/spec.yml index 830feebb03..b36adac061 100644 --- a/specs/abtesting/spec.yml +++ b/specs/abtesting/spec.yml @@ -6,9 +6,9 @@ info: components: securitySchemes: appId: - $ref: '../common/securitySchemes/common.yml#/appId' + $ref: '../common/securitySchemes.yml#/appId' apiKey: - $ref: '../common/securitySchemes/common.yml#/apiKey' + $ref: '../common/securitySchemes.yml#/apiKey' security: - appId: [] apiKey: [] diff --git a/specs/analytics/spec.yml b/specs/analytics/spec.yml index e4949ef4e7..871895b823 100644 --- a/specs/analytics/spec.yml +++ b/specs/analytics/spec.yml @@ -6,9 +6,9 @@ info: components: securitySchemes: appId: - $ref: '../common/securitySchemes/common.yml#/appId' + $ref: '../common/securitySchemes.yml#/appId' apiKey: - $ref: '../common/securitySchemes/common.yml#/apiKey' + $ref: '../common/securitySchemes.yml#/apiKey' security: - appId: [] apiKey: [] diff --git a/specs/common/securitySchemes/common.yml b/specs/common/securitySchemes.yml similarity index 100% rename from specs/common/securitySchemes/common.yml rename to specs/common/securitySchemes.yml diff --git a/specs/insights/spec.yml b/specs/insights/spec.yml index 7671ea6be2..93735e369d 100644 --- a/specs/insights/spec.yml +++ b/specs/insights/spec.yml @@ -6,9 +6,9 @@ info: components: securitySchemes: appId: - $ref: '../common/securitySchemes/common.yml#/appId' + $ref: '../common/securitySchemes.yml#/appId' apiKey: - $ref: '../common/securitySchemes/common.yml#/apiKey' + $ref: '../common/securitySchemes.yml#/apiKey' security: - appId: [] apiKey: [] diff --git a/specs/personalization/spec.yml b/specs/personalization/spec.yml index 2f94987c90..a774522962 100644 --- a/specs/personalization/spec.yml +++ b/specs/personalization/spec.yml @@ -6,9 +6,9 @@ info: components: securitySchemes: appId: - $ref: '../common/securitySchemes/common.yml#/appId' + $ref: '../common/securitySchemes.yml#/appId' apiKey: - $ref: '../common/securitySchemes/common.yml#/apiKey' + $ref: '../common/securitySchemes.yml#/apiKey' security: - appId: [] apiKey: [] diff --git a/specs/query_suggestions/spec.yml b/specs/query_suggestions/spec.yml index 75200c2dc6..5aaa34a1c8 100644 --- a/specs/query_suggestions/spec.yml +++ b/specs/query_suggestions/spec.yml @@ -6,9 +6,9 @@ info: components: securitySchemes: appId: - $ref: '../common/securitySchemes/common.yml#/appId' + $ref: '../common/securitySchemes.yml#/appId' apiKey: - $ref: '../common/securitySchemes/common.yml#/apiKey' + $ref: '../common/securitySchemes.yml#/apiKey' security: - appId: [] apiKey: [] diff --git a/specs/recommend/spec.yml b/specs/recommend/spec.yml index 2e50c62db1..706b441952 100644 --- a/specs/recommend/spec.yml +++ b/specs/recommend/spec.yml @@ -6,9 +6,9 @@ info: components: securitySchemes: appId: - $ref: '../common/securitySchemes/common.yml#/appId' + $ref: '../common/securitySchemes.yml#/appId' apiKey: - $ref: '../common/securitySchemes/common.yml#/apiKey' + $ref: '../common/securitySchemes.yml#/apiKey' security: - appId: [] apiKey: [] diff --git a/specs/search/spec.yml b/specs/search/spec.yml index a5df13e226..5ec6abf909 100644 --- a/specs/search/spec.yml +++ b/specs/search/spec.yml @@ -6,9 +6,9 @@ info: components: securitySchemes: appId: - $ref: '../common/securitySchemes/common.yml#/appId' + $ref: '../common/securitySchemes.yml#/appId' apiKey: - $ref: '../common/securitySchemes/common.yml#/apiKey' + $ref: '../common/securitySchemes.yml#/apiKey' security: - appId: [] apiKey: []