From a70ab8737ebecfd92857ae8c12297f0aede0961f Mon Sep 17 00:00:00 2001 From: Damien Couchez Date: Thu, 25 Nov 2021 14:58:25 +0100 Subject: [PATCH] feat: add full clients architecture init (#13) --- README.md | 4 +- openapitools.json | 2 +- package.json | 6 +- specs/abtesting/paths/abtest.yml | 2 + specs/abtesting/paths/abtests.yml | 2 + specs/abtesting/paths/stopAbTest.yml | 1 + specs/abtesting/spec.yml | 21 +++ .../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/getSearchesCount.yml | 1 + .../paths/search/getSearchesNoClicks.yml | 1 + .../paths/search/getSearchesNoResults.yml | 1 + .../paths/search/getTopCountries.yml | 1 + .../paths/search/getTopFilterAttributes.yml | 2 + specs/analytics/paths/search/getTopHits.yml | 2 + .../analytics/paths/search/getTopSearches.yml | 1 + .../analytics/paths/search/getUsersCount.yml | 1 + specs/analytics/paths/status/getStatus.yml | 1 + specs/analytics/spec.yml | 62 ++++++++ specs/{ => common}/parameters.yml | 0 specs/{ => common}/responses/common.yml | 0 specs/{ => common}/schemas/ErrorBase.yml | 0 specs/common/securitySchemes.yml | 8 + specs/insights/paths/pushEvents.yml | 1 + specs/insights/spec.yml | 17 ++ specs/paths/indexes/search.yml | 27 ---- .../paths/deleteUserProfile.yml | 1 + .../paths/getUserTokenProfile.yml | 1 + .../paths/personalizationStrategy.yml | 2 + specs/personalization/spec.yml | 21 +++ .../paths/getConfigurationStatus.yml | 1 + specs/query_suggestions/paths/getLogFile.yml | 1 + specs/query_suggestions/paths/qsConfig.yml | 3 + specs/query_suggestions/paths/qsConfigs.yml | 2 + specs/query_suggestions/spec.yml | 23 +++ specs/recommend/paths/getRecommendations.yml | 1 + specs/recommend/spec.yml | 17 ++ .../common}/responses/BadRequest.yml | 2 +- .../common}/responses/IndexNotFound.yml | 2 +- .../common}/schemas/IndexSettingsParams.yml | 0 specs/{ => search/common}/schemas/Record.yml | 2 +- .../common}/schemas/RequestOptions.yml | 0 .../common}/schemas/SearchParams.yml | 0 .../common}/schemas/SearchResponse.yml | 4 +- specs/search/paths/advanced/getLogs.yml | 1 + specs/search/paths/advanced/getTask.yml | 1 + specs/search/paths/advanced/isAlive.yml | 1 + .../dictionaries/batchDictionaryEntries.yml | 1 + .../paths/dictionaries/dictionarySettings.yml | 2 + .../dictionaries/getDictionaryLanguages.yml | 1 + .../dictionaries/searchDictionaryEntries.yml | 1 + specs/search/paths/keys/key.yml | 3 + specs/search/paths/keys/keys.yml | 2 + specs/search/paths/keys/restoreApiKey.yml | 1 + .../search/paths/manage_indices/copyIndex.yml | 1 + .../paths/manage_indices/listIndices.yml | 1 + .../multiclusters/batchAssignUserIds.yml | 1 + .../paths/multiclusters/getTopUserIds.yml | 1 + .../multiclusters/hasPendingMappings.yml | 1 + .../paths/multiclusters/listClusters.yml | 1 + .../paths/multiclusters/searchUserIds.yml | 1 + specs/search/paths/multiclusters/userId.yml | 2 + specs/search/paths/multiclusters/userIds.yml | 2 + .../paths/objects}/batch.yml | 10 +- specs/search/paths/objects/clearObjects.yml | 1 + specs/search/paths/objects/deleteBy.yml | 1 + specs/search/paths/objects/getObject.yml | 1 + specs/search/paths/objects/multipleBatch.yml | 1 + .../paths/objects/multipleGetObjects.yml | 1 + specs/search/paths/objects/object.yml | 2 + .../paths/objects/objects.yml} | 12 +- specs/search/paths/objects/partialUpdate.yml | 1 + specs/search/paths/rules/batchRules.yml | 1 + specs/search/paths/rules/clearRules.yml | 1 + specs/search/paths/rules/rule.yml | 3 + specs/search/paths/rules/searchRules.yml | 1 + specs/search/paths/search/browse.yml | 1 + .../paths/search}/multipleQueries.yml | 8 +- specs/search/paths/search/search.yml | 27 ++++ .../paths/search/searchForFacetValues.yml | 1 + specs/search/paths/settings/settings.yml | 2 + specs/search/paths/synonyms/batchSynonyms.yml | 1 + .../paths/synonyms/clearAllSynonyms.yml | 1 + .../search/paths/synonyms/searchSynonyms.yml | 1 + specs/search/paths/synonyms/synonym.yml | 3 + specs/search/paths/vault/appendSource.yml | 1 + specs/search/paths/vault/deleteSource.yml | 1 + specs/search/paths/vault/vaultSources.yml | 2 + specs/search/spec.yml | 146 ++++++++++++++++++ specs/spec.yml | 44 ------ 97 files changed, 461 insertions(+), 95 deletions(-) create mode 100644 specs/abtesting/paths/abtest.yml create mode 100644 specs/abtesting/paths/abtests.yml create mode 100644 specs/abtesting/paths/stopAbTest.yml create mode 100644 specs/abtesting/spec.yml 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/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 rename specs/{ => common}/parameters.yml (100%) rename specs/{ => common}/responses/common.yml (100%) rename specs/{ => common}/schemas/ErrorBase.yml (100%) create mode 100644 specs/common/securitySchemes.yml create mode 100644 specs/insights/paths/pushEvents.yml create mode 100644 specs/insights/spec.yml delete mode 100644 specs/paths/indexes/search.yml create mode 100644 specs/personalization/paths/deleteUserProfile.yml create mode 100644 specs/personalization/paths/getUserTokenProfile.yml create mode 100644 specs/personalization/paths/personalizationStrategy.yml create mode 100644 specs/personalization/spec.yml create mode 100644 specs/query_suggestions/paths/getConfigurationStatus.yml create mode 100644 specs/query_suggestions/paths/getLogFile.yml create mode 100644 specs/query_suggestions/paths/qsConfig.yml create mode 100644 specs/query_suggestions/paths/qsConfigs.yml create mode 100644 specs/query_suggestions/spec.yml create mode 100644 specs/recommend/paths/getRecommendations.yml create mode 100644 specs/recommend/spec.yml rename specs/{ => search/common}/responses/BadRequest.yml (62%) rename specs/{ => search/common}/responses/IndexNotFound.yml (57%) rename specs/{ => search/common}/schemas/IndexSettingsParams.yml (100%) rename specs/{ => search/common}/schemas/Record.yml (98%) rename specs/{ => search/common}/schemas/RequestOptions.yml (100%) rename specs/{ => search/common}/schemas/SearchParams.yml (100%) rename specs/{ => search/common}/schemas/SearchResponse.yml (96%) create mode 100644 specs/search/paths/advanced/getLogs.yml create mode 100644 specs/search/paths/advanced/getTask.yml create mode 100644 specs/search/paths/advanced/isAlive.yml create mode 100644 specs/search/paths/dictionaries/batchDictionaryEntries.yml create mode 100644 specs/search/paths/dictionaries/dictionarySettings.yml create mode 100644 specs/search/paths/dictionaries/getDictionaryLanguages.yml create mode 100644 specs/search/paths/dictionaries/searchDictionaryEntries.yml create mode 100644 specs/search/paths/keys/key.yml create mode 100644 specs/search/paths/keys/keys.yml create mode 100644 specs/search/paths/keys/restoreApiKey.yml create mode 100644 specs/search/paths/manage_indices/copyIndex.yml create mode 100644 specs/search/paths/manage_indices/listIndices.yml create mode 100644 specs/search/paths/multiclusters/batchAssignUserIds.yml create mode 100644 specs/search/paths/multiclusters/getTopUserIds.yml create mode 100644 specs/search/paths/multiclusters/hasPendingMappings.yml create mode 100644 specs/search/paths/multiclusters/listClusters.yml create mode 100644 specs/search/paths/multiclusters/searchUserIds.yml create mode 100644 specs/search/paths/multiclusters/userId.yml create mode 100644 specs/search/paths/multiclusters/userIds.yml rename specs/{paths/indexes => search/paths/objects}/batch.yml (83%) create mode 100644 specs/search/paths/objects/clearObjects.yml create mode 100644 specs/search/paths/objects/deleteBy.yml create mode 100644 specs/search/paths/objects/getObject.yml create mode 100644 specs/search/paths/objects/multipleBatch.yml create mode 100644 specs/search/paths/objects/multipleGetObjects.yml create mode 100644 specs/search/paths/objects/object.yml rename specs/{paths/indexes/saveObject.yml => search/paths/objects/objects.yml} (67%) create mode 100644 specs/search/paths/objects/partialUpdate.yml create mode 100644 specs/search/paths/rules/batchRules.yml create mode 100644 specs/search/paths/rules/clearRules.yml create mode 100644 specs/search/paths/rules/rule.yml create mode 100644 specs/search/paths/rules/searchRules.yml create mode 100644 specs/search/paths/search/browse.yml rename specs/{paths/indexes => search/paths/search}/multipleQueries.yml (86%) create mode 100644 specs/search/paths/search/search.yml create mode 100644 specs/search/paths/search/searchForFacetValues.yml create mode 100644 specs/search/paths/settings/settings.yml create mode 100644 specs/search/paths/synonyms/batchSynonyms.yml create mode 100644 specs/search/paths/synonyms/clearAllSynonyms.yml create mode 100644 specs/search/paths/synonyms/searchSynonyms.yml create mode 100644 specs/search/paths/synonyms/synonym.yml create mode 100644 specs/search/paths/vault/appendSource.yml create mode 100644 specs/search/paths/vault/deleteSource.yml create mode 100644 specs/search/paths/vault/vaultSources.yml create mode 100644 specs/search/spec.yml delete mode 100644 specs/spec.yml diff --git a/README.md b/README.md index e491854c59..4a96094493 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ nvm use && yarn ``` -## Generate clients based on the [`spec.yml` file](./specs/spec.yml) +## Generate clients based on the [`spec.yml` file](./search/specs.yml) ```bash -yarn generate +yarn generate:search ``` ## Build generated clients diff --git a/openapitools.json b/openapitools.json index 866cf8a97a..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.yml", + "glob": "specs/search/spec.yml", "gitHost": "algolia", "gitUserId": "algolia", "gitRepoId": "algoliasearch-client-javascript", diff --git a/package.json b/package.json index b5fa07c56e..a844a49e83 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/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,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/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", "utils:import-js": "mkdir -p -- clients/algoliasearch-client-javascript/utils && cp -R clients/utils/javascript/ clients/algoliasearch-client-javascript/utils" }, diff --git a/specs/abtesting/paths/abtest.yml b/specs/abtesting/paths/abtest.yml new file mode 100644 index 0000000000..4a95117692 --- /dev/null +++ b/specs/abtesting/paths/abtest.yml @@ -0,0 +1,2 @@ +get: +delete: diff --git a/specs/abtesting/paths/abtests.yml b/specs/abtesting/paths/abtests.yml new file mode 100644 index 0000000000..9791372547 --- /dev/null +++ b/specs/abtesting/paths/abtests.yml @@ -0,0 +1,2 @@ +post: +get: diff --git a/specs/abtesting/paths/stopAbTest.yml b/specs/abtesting/paths/stopAbTest.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/abtesting/paths/stopAbTest.yml @@ -0,0 +1 @@ +post: diff --git a/specs/abtesting/spec.yml b/specs/abtesting/spec.yml new file mode 100644 index 0000000000..b36adac061 --- /dev/null +++ b/specs/abtesting/spec.yml @@ -0,0 +1,21 @@ +openapi: 3.0.2 +info: + title: A/B Testing API + description: API powering the A/B Testing feature of Algolia. + version: 0.0.1 +components: + securitySchemes: + appId: + $ref: '../common/securitySchemes.yml#/appId' + apiKey: + $ref: '../common/securitySchemes.yml#/apiKey' +security: + - appId: [] + apiKey: [] +paths: + /2/abtests: + $ref: './paths/abtests.yml' +# /2/abtests/{id}: +# $ref: './paths/abtest.yml' +# /2/abtests/{id}/stop: +# $ref: './paths/stopAbTest.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/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..e012e7acb5 --- /dev/null +++ b/specs/analytics/paths/search/getTopFilterAttributes.yml @@ -0,0 +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 new file mode 100644 index 0000000000..e92c2b1912 --- /dev/null +++ b/specs/analytics/paths/search/getTopHits.yml @@ -0,0 +1,2 @@ +get: +# handle /2/hits?search= as well 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..871895b823 --- /dev/null +++ b/specs/analytics/spec.yml @@ -0,0 +1,62 @@ +openapi: 3.0.2 +info: + title: Analytics API + description: API powering the Analytics feature of Algolia. + version: 0.1.0 +components: + securitySchemes: + appId: + $ref: '../common/securitySchemes.yml#/appId' + apiKey: + $ref: '../common/securitySchemes.yml#/apiKey' +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/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/{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/positions: + # $ref: './paths/click/getClickPositions.yml' + # /2/clicks/clickThroughRate: + # $ref: './paths/click/getClickThroughRate.yml' + # /2/conversions/conversionRate: + # $ref: './paths/click/getConversionRate.yml' diff --git a/specs/parameters.yml b/specs/common/parameters.yml similarity index 100% rename from specs/parameters.yml rename to specs/common/parameters.yml diff --git a/specs/responses/common.yml b/specs/common/responses/common.yml similarity index 100% rename from specs/responses/common.yml rename to specs/common/responses/common.yml diff --git a/specs/schemas/ErrorBase.yml b/specs/common/schemas/ErrorBase.yml similarity index 100% rename from specs/schemas/ErrorBase.yml rename to specs/common/schemas/ErrorBase.yml diff --git a/specs/common/securitySchemes.yml b/specs/common/securitySchemes.yml new file mode 100644 index 0000000000..211d837fa7 --- /dev/null +++ b/specs/common/securitySchemes.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/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..93735e369d --- /dev/null +++ b/specs/insights/spec.yml @@ -0,0 +1,17 @@ +openapi: 3.0.2 +info: + title: Insights API + description: API powering the Insights feature of Algolia. + version: 0.0.1 +components: + securitySchemes: + appId: + $ref: '../common/securitySchemes.yml#/appId' + apiKey: + $ref: '../common/securitySchemes.yml#/apiKey' +security: + - appId: [] + apiKey: [] +paths: + /1/events: + $ref: './paths/pushEvents.yml' diff --git a/specs/paths/indexes/search.yml b/specs/paths/indexes/search.yml deleted file mode 100644 index 0b6d615b31..0000000000 --- a/specs/paths/indexes/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/personalization/paths/deleteUserProfile.yml b/specs/personalization/paths/deleteUserProfile.yml new file mode 100644 index 0000000000..ac5790e8f8 --- /dev/null +++ b/specs/personalization/paths/deleteUserProfile.yml @@ -0,0 +1 @@ +delete: diff --git a/specs/personalization/paths/getUserTokenProfile.yml b/specs/personalization/paths/getUserTokenProfile.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/personalization/paths/getUserTokenProfile.yml @@ -0,0 +1 @@ +get: diff --git a/specs/personalization/paths/personalizationStrategy.yml b/specs/personalization/paths/personalizationStrategy.yml new file mode 100644 index 0000000000..9791372547 --- /dev/null +++ b/specs/personalization/paths/personalizationStrategy.yml @@ -0,0 +1,2 @@ +post: +get: diff --git a/specs/personalization/spec.yml b/specs/personalization/spec.yml new file mode 100644 index 0000000000..a774522962 --- /dev/null +++ b/specs/personalization/spec.yml @@ -0,0 +1,21 @@ +openapi: 3.0.2 +info: + title: Personalization API + description: API powering the Personalization feature of Algolia. + version: 0.0.1 +components: + securitySchemes: + appId: + $ref: '../common/securitySchemes.yml#/appId' + apiKey: + $ref: '../common/securitySchemes.yml#/apiKey' +security: + - appId: [] + apiKey: [] +paths: + /1/profiles/personalization/{userToken}: + $ref: './paths/getUserTokenProfile.yml' +# /1/profiles/{userToken}: +# $ref: './paths/deleteUserProfile.yml' +# /1/strategies/personalization: +# $ref: './paths/personalizationStrategy.yml' diff --git a/specs/query_suggestions/paths/getConfigurationStatus.yml b/specs/query_suggestions/paths/getConfigurationStatus.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/query_suggestions/paths/getConfigurationStatus.yml @@ -0,0 +1 @@ +get: diff --git a/specs/query_suggestions/paths/getLogFile.yml b/specs/query_suggestions/paths/getLogFile.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/query_suggestions/paths/getLogFile.yml @@ -0,0 +1 @@ +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/qsConfigs.yml b/specs/query_suggestions/paths/qsConfigs.yml new file mode 100644 index 0000000000..9791372547 --- /dev/null +++ b/specs/query_suggestions/paths/qsConfigs.yml @@ -0,0 +1,2 @@ +post: +get: diff --git a/specs/query_suggestions/spec.yml b/specs/query_suggestions/spec.yml new file mode 100644 index 0000000000..5aaa34a1c8 --- /dev/null +++ b/specs/query_suggestions/spec.yml @@ -0,0 +1,23 @@ +openapi: 3.0.2 +info: + title: Query Suggestions API + description: API powering the Query Suggestions feature of Algolia. + version: 0.0.1 +components: + securitySchemes: + appId: + $ref: '../common/securitySchemes.yml#/appId' + apiKey: + $ref: '../common/securitySchemes.yml#/apiKey' +security: + - appId: [] + apiKey: [] +paths: + /1/configs: + $ref: './paths/qsConfigs.yml' +# /1/configs/{indexName}: +# $ref: './paths/qsConfig.yml' +# /1/configs/{indexName}/status: +# $ref: './paths/getConfigurationStatus.yml' +# /1/logs/{indexName}: +# $ref: './paths/getLogFile.yml' diff --git a/specs/recommend/paths/getRecommendations.yml b/specs/recommend/paths/getRecommendations.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/recommend/paths/getRecommendations.yml @@ -0,0 +1 @@ +post: diff --git a/specs/recommend/spec.yml b/specs/recommend/spec.yml new file mode 100644 index 0000000000..706b441952 --- /dev/null +++ b/specs/recommend/spec.yml @@ -0,0 +1,17 @@ +openapi: 3.0.2 +info: + title: Recommend API + description: API powering the Recommend feature of Algolia. + version: 0.0.1 +components: + securitySchemes: + appId: + $ref: '../common/securitySchemes.yml#/appId' + apiKey: + $ref: '../common/securitySchemes.yml#/apiKey' +security: + - appId: [] + apiKey: [] +paths: + /1/indexes/*/recommendations: + $ref: './paths/getRecommendations.yml' diff --git a/specs/responses/BadRequest.yml b/specs/search/common/responses/BadRequest.yml similarity index 62% rename from specs/responses/BadRequest.yml rename to specs/search/common/responses/BadRequest.yml index bd78840b4f..e5794d26f1 100644 --- a/specs/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/responses/IndexNotFound.yml b/specs/search/common/responses/IndexNotFound.yml similarity index 57% rename from specs/responses/IndexNotFound.yml rename to specs/search/common/responses/IndexNotFound.yml index a13beb85b1..1ba8607d12 100644 --- a/specs/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/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 98% rename from specs/schemas/Record.yml rename to specs/search/common/schemas/Record.yml index 564ef9bc6c..9b8bada454 100644 --- a/specs/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/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 96% rename from specs/schemas/SearchResponse.yml rename to specs/search/common/schemas/SearchResponse.yml index ce5c41877d..996162a094 100644 --- a/specs/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/advanced/getLogs.yml b/specs/search/paths/advanced/getLogs.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/search/paths/advanced/getLogs.yml @@ -0,0 +1 @@ +get: diff --git a/specs/search/paths/advanced/getTask.yml b/specs/search/paths/advanced/getTask.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/search/paths/advanced/getTask.yml @@ -0,0 +1 @@ +get: diff --git a/specs/search/paths/advanced/isAlive.yml b/specs/search/paths/advanced/isAlive.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/search/paths/advanced/isAlive.yml @@ -0,0 +1 @@ +get: diff --git a/specs/search/paths/dictionaries/batchDictionaryEntries.yml b/specs/search/paths/dictionaries/batchDictionaryEntries.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/dictionaries/batchDictionaryEntries.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/dictionaries/dictionarySettings.yml b/specs/search/paths/dictionaries/dictionarySettings.yml new file mode 100644 index 0000000000..6652915bd0 --- /dev/null +++ b/specs/search/paths/dictionaries/dictionarySettings.yml @@ -0,0 +1,2 @@ +put: +get: diff --git a/specs/search/paths/dictionaries/getDictionaryLanguages.yml b/specs/search/paths/dictionaries/getDictionaryLanguages.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/search/paths/dictionaries/getDictionaryLanguages.yml @@ -0,0 +1 @@ +get: diff --git a/specs/search/paths/dictionaries/searchDictionaryEntries.yml b/specs/search/paths/dictionaries/searchDictionaryEntries.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/dictionaries/searchDictionaryEntries.yml @@ -0,0 +1 @@ +post: 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/keys.yml b/specs/search/paths/keys/keys.yml new file mode 100644 index 0000000000..9791372547 --- /dev/null +++ b/specs/search/paths/keys/keys.yml @@ -0,0 +1,2 @@ +post: +get: diff --git a/specs/search/paths/keys/restoreApiKey.yml b/specs/search/paths/keys/restoreApiKey.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/keys/restoreApiKey.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/manage_indices/copyIndex.yml b/specs/search/paths/manage_indices/copyIndex.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/manage_indices/copyIndex.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/manage_indices/listIndices.yml b/specs/search/paths/manage_indices/listIndices.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/search/paths/manage_indices/listIndices.yml @@ -0,0 +1 @@ +get: diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -0,0 +1 @@ +get: diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -0,0 +1 @@ +get: diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -0,0 +1 @@ +get: diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml new file mode 100644 index 0000000000..4a95117692 --- /dev/null +++ b/specs/search/paths/multiclusters/userId.yml @@ -0,0 +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/paths/indexes/batch.yml b/specs/search/paths/objects/batch.yml similarity index 83% rename from specs/paths/indexes/batch.yml rename to specs/search/paths/objects/batch.yml index 7cc4ca405b..4eaa3d48d8 100644 --- a/specs/paths/indexes/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/search/paths/objects/clearObjects.yml b/specs/search/paths/objects/clearObjects.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/objects/clearObjects.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/objects/deleteBy.yml b/specs/search/paths/objects/deleteBy.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/objects/deleteBy.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/objects/getObject.yml b/specs/search/paths/objects/getObject.yml new file mode 100644 index 0000000000..3ddb9d7f54 --- /dev/null +++ b/specs/search/paths/objects/getObject.yml @@ -0,0 +1 @@ +get: diff --git a/specs/search/paths/objects/multipleBatch.yml b/specs/search/paths/objects/multipleBatch.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/objects/multipleBatch.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/objects/multipleGetObjects.yml b/specs/search/paths/objects/multipleGetObjects.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/objects/multipleGetObjects.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/objects/object.yml b/specs/search/paths/objects/object.yml new file mode 100644 index 0000000000..240422df80 --- /dev/null +++ b/specs/search/paths/objects/object.yml @@ -0,0 +1,2 @@ +put: +delete: diff --git a/specs/paths/indexes/saveObject.yml b/specs/search/paths/objects/objects.yml similarity index 67% rename from specs/paths/indexes/saveObject.yml rename to specs/search/paths/objects/objects.yml index 947ef11dc6..a36130275c 100644 --- a/specs/paths/indexes/saveObject.yml +++ b/specs/search/paths/objects/objects.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,12 @@ 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' +#delete index +# delete: diff --git a/specs/search/paths/objects/partialUpdate.yml b/specs/search/paths/objects/partialUpdate.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/objects/partialUpdate.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/rules/batchRules.yml b/specs/search/paths/rules/batchRules.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/rules/batchRules.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/rules/clearRules.yml b/specs/search/paths/rules/clearRules.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/rules/clearRules.yml @@ -0,0 +1 @@ +post: 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/searchRules.yml b/specs/search/paths/rules/searchRules.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/rules/searchRules.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/search/browse.yml b/specs/search/paths/search/browse.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/search/browse.yml @@ -0,0 +1 @@ +post: diff --git a/specs/paths/indexes/multipleQueries.yml b/specs/search/paths/search/multipleQueries.yml similarity index 86% rename from specs/paths/indexes/multipleQueries.yml rename to specs/search/paths/search/multipleQueries.yml index 5f0749b37c..399602cde4 100644 --- a/specs/paths/indexes/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..0025493972 --- /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/search/paths/search/searchForFacetValues.yml b/specs/search/paths/search/searchForFacetValues.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/search/searchForFacetValues.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/settings/settings.yml b/specs/search/paths/settings/settings.yml new file mode 100644 index 0000000000..7f2769e14e --- /dev/null +++ b/specs/search/paths/settings/settings.yml @@ -0,0 +1,2 @@ +get: +put: diff --git a/specs/search/paths/synonyms/batchSynonyms.yml b/specs/search/paths/synonyms/batchSynonyms.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/synonyms/batchSynonyms.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/synonyms/clearAllSynonyms.yml b/specs/search/paths/synonyms/clearAllSynonyms.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/synonyms/clearAllSynonyms.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/synonyms/searchSynonyms.yml b/specs/search/paths/synonyms/searchSynonyms.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/synonyms/searchSynonyms.yml @@ -0,0 +1 @@ +post: 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/appendSource.yml b/specs/search/paths/vault/appendSource.yml new file mode 100644 index 0000000000..6adb517bf4 --- /dev/null +++ b/specs/search/paths/vault/appendSource.yml @@ -0,0 +1 @@ +post: diff --git a/specs/search/paths/vault/deleteSource.yml b/specs/search/paths/vault/deleteSource.yml new file mode 100644 index 0000000000..ac5790e8f8 --- /dev/null +++ b/specs/search/paths/vault/deleteSource.yml @@ -0,0 +1 @@ +delete: diff --git a/specs/search/paths/vault/vaultSources.yml b/specs/search/paths/vault/vaultSources.yml new file mode 100644 index 0000000000..7f2769e14e --- /dev/null +++ b/specs/search/paths/vault/vaultSources.yml @@ -0,0 +1,2 @@ +get: +put: diff --git a/specs/search/spec.yml b/specs/search/spec.yml new file mode 100644 index 0000000000..5ec6abf909 --- /dev/null +++ b/specs/search/spec.yml @@ -0,0 +1,146 @@ +openapi: 3.0.2 +info: + title: Search API + description: API powering the Search feature of Algolia. + version: 0.1.0 +components: + securitySchemes: + appId: + $ref: '../common/securitySchemes.yml#/appId' + apiKey: + $ref: '../common/securitySchemes.yml#/apiKey' +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/objects.yml' + # /1/indexes/{indexName}/{objectID}: + # $ref: './paths/objects/object.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/settings.yml' + # + # ################################ + # ### Manage Indices Endpoints ### + # ################################ + # /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/synonym.yml' + # /1/indexes/{indexName}/synonyms/batch: + # $ref: './paths/synonyms/batchSynonyms.yml' + # /1/indexes/{indexName}/synonyms/clear: + # $ref: './paths/synonyms/clearAllSynonyms.yml' + # /1/indexes/{indexName}/synonyms/search: + # $ref: './paths/synonyms/searchSynonyms.yml' + # + # ###################### + # ### Keys Endpoints ### + # ###################### + # /1/keys: + # $ref: './paths/keys/keys.yml' + # /1/keys/{key}: + # $ref: './paths/keys/key.yml' + # /1/keys/{key}/restore: + # $ref: './paths/keys/restoreApiKey.yml' + # + # ####################### + # ### Rules Endpoints ### + # ####################### + # /1/indexes/{indexName}/rules/{objectID}: + # $ref: './paths/rules/rule.yml' + # /1/indexes/{indexName}/rules/batch: + # $ref: './paths/rules/batchRules.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/dictionarySettings.yml' + # /1/dictionaries/*/languages: + # $ref: './paths/dictionaries/getDictionaryLanguages.yml' + # + # ############################### + # ### MultiClusters Endpoints ### + # ############################### + # /1/clusters/mapping: + # $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/userId.yml' + # /1/clusters: + # $ref: './paths/multiclusters/listClusters.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/vaultSources.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.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'