From 5211bb3384972b7d478adf57eae7930c569e682d Mon Sep 17 00:00:00 2001 From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com> Date: Thu, 28 Apr 2022 17:53:16 +0200 Subject: [PATCH 1/8] fix(spec): cleanup summary --- specs/abtesting/paths/abtest.yml | 4 ++-- specs/abtesting/paths/abtests.yml | 4 ++-- specs/abtesting/paths/stopABTest.yml | 2 +- .../analytics/paths/click/getAverageClickPosition.yml | 2 +- specs/analytics/paths/click/getClickPositions.yml | 2 +- specs/analytics/paths/click/getClickThroughRate.yml | 2 +- specs/analytics/paths/click/getConversionRate.yml | 2 +- specs/analytics/paths/search/getNoClickRate.yml | 2 +- specs/analytics/paths/search/getNoResultsRate.yml | 2 +- specs/analytics/paths/search/getSearchesCount.yml | 2 +- specs/analytics/paths/search/getSearchesNoClicks.yml | 2 +- specs/analytics/paths/search/getSearchesNoResults.yml | 2 +- specs/analytics/paths/search/getTopCountries.yml | 2 +- .../analytics/paths/search/getTopFilterAttributes.yml | 2 +- .../paths/search/getTopFilterForAttribute.yml | 2 +- .../analytics/paths/search/getTopFiltersNoResults.yml | 2 +- specs/analytics/paths/search/getTopHits.yml | 2 +- specs/analytics/paths/search/getTopSearches.yml | 2 +- specs/analytics/paths/search/getUsersCount.yml | 2 +- specs/analytics/paths/status/getStatus.yml | 2 +- specs/common/schemas/CustomRequest.yml | 2 +- specs/insights/paths/pushEvents.yml | 2 +- specs/personalization/paths/deleteUserProfile.yml | 2 +- specs/personalization/paths/getUserTokenProfile.yml | 2 +- .../personalization/paths/personalizationStrategy.yml | 4 ++-- specs/predict/paths/fetchUserProfile.yml | 2 +- .../paths/getConfigurationStatus.yml | 2 +- specs/query-suggestions/paths/getLogFile.yml | 2 +- specs/query-suggestions/paths/qsConfig.yml | 6 +++--- specs/query-suggestions/paths/qsConfigs.yml | 4 ++-- specs/recommend/paths/getRecommendations.yml | 2 +- specs/search/paths/advanced/getLogs.yml | 4 ++-- specs/search/paths/advanced/getTask.yml | 2 +- .../paths/dictionaries/batchDictionaryEntries.yml | 2 +- .../search/paths/dictionaries/dictionarySettings.yml | 6 +++--- .../paths/dictionaries/getDictionaryLanguages.yml | 2 +- .../paths/dictionaries/searchDictionaryEntries.yml | 2 +- specs/search/paths/keys/key.yml | 6 +++--- specs/search/paths/keys/keys.yml | 4 ++-- specs/search/paths/keys/restoreApiKey.yml | 2 +- specs/search/paths/manage_indices/listIndices.yml | 2 +- specs/search/paths/manage_indices/operationIndex.yml | 2 +- .../search/paths/multiclusters/hasPendingMappings.yml | 2 +- specs/search/paths/objects/batch.yml | 4 ++-- specs/search/paths/objects/clearObjects.yml | 2 +- specs/search/paths/objects/deleteBy.yml | 2 +- specs/search/paths/objects/multipleBatch.yml | 2 +- specs/search/paths/objects/multipleGetObjects.yml | 2 +- specs/search/paths/objects/object.yml | 11 +++++++---- specs/search/paths/objects/objects.yml | 4 ++-- specs/search/paths/objects/partialUpdate.yml | 2 +- specs/search/paths/rules/batchRules.yml | 2 +- specs/search/paths/rules/clearRules.yml | 2 +- specs/search/paths/rules/rule.yml | 6 +++--- specs/search/paths/rules/searchRules.yml | 2 +- specs/search/paths/search/browse.yml | 2 +- specs/search/paths/search/multipleQueries.yml | 4 ++-- specs/search/paths/search/search.yml | 4 ++-- specs/search/paths/settings/settings.yml | 8 ++++---- specs/search/paths/synonyms/batchSynonyms.yml | 2 +- specs/search/paths/synonyms/clearAllSynonyms.yml | 2 +- specs/search/paths/synonyms/searchSynonyms.yml | 2 +- specs/search/paths/synonyms/synonym.yml | 6 +++--- specs/search/paths/vault/appendSource.yml | 2 +- specs/search/paths/vault/deleteSource.yml | 2 +- specs/search/paths/vault/vaultSources.yml | 4 ++-- specs/search/spec.yml | 2 +- specs/sources/paths/ingest/postUrl.yml | 2 +- website/docusaurus.config.js | 1 + 69 files changed, 99 insertions(+), 95 deletions(-) diff --git a/specs/abtesting/paths/abtest.yml b/specs/abtesting/paths/abtest.yml index 91c4b14e22..9550596d53 100644 --- a/specs/abtesting/paths/abtest.yml +++ b/specs/abtesting/paths/abtest.yml @@ -4,7 +4,7 @@ get: Returns metadata and metrics for A/B test id. Behaves in the same way as GET /2/abtests however the endpoint will return 403. - summary: Returns metadata and metrics for A/B test id. + summary: Returns metadata and metrics for A/B test id parameters: - $ref: '../common/parameters.yml#/ID' responses: @@ -26,7 +26,7 @@ get: delete: operationId: deleteABTest description: Deletes the A/B Test and removes all associated metadata & metrics. - summary: Deletes the A/B Test. + summary: Deletes the A/B Test parameters: - $ref: '../common/parameters.yml#/ID' responses: diff --git a/specs/abtesting/paths/abtests.yml b/specs/abtesting/paths/abtests.yml index 8f075a5a86..b98696544d 100644 --- a/specs/abtesting/paths/abtests.yml +++ b/specs/abtesting/paths/abtests.yml @@ -4,7 +4,7 @@ post: Creates a new A/B test with provided configuration. You can set an A/B test on two different indices with different settings, or on the same index with different search parameters by providing a customSearchParameters setting on one of the variants. - summary: Creates a new A/B test with provided configuration. + summary: Creates a new A/B test with provided configuration requestBody: required: true content: @@ -49,7 +49,7 @@ get: operationId: listABTests description: > Fetch all existing A/B tests for App that are available for the current API Key. Returns an array of metadata and metrics. When no data has been processed, the metrics will be returned as null. - summary: Fetch all existing A/B tests for App that are available for the current API Key. + summary: Fetch all existing A/B tests for App that are available for the current API Key parameters: - $ref: '../../common/parameters.yml#/Offset' - $ref: '../../common/parameters.yml#/Limit' diff --git a/specs/abtesting/paths/stopABTest.yml b/specs/abtesting/paths/stopABTest.yml index 33cc821b9a..b08a66c69c 100644 --- a/specs/abtesting/paths/stopABTest.yml +++ b/specs/abtesting/paths/stopABTest.yml @@ -6,7 +6,7 @@ post: At this point, the test is over and cannot be restarted. As a result, your application is back to normal: index A will perform as usual, receiving 100% of all search requests. Associated metadata and metrics are still stored. - summary: Marks the A/B test as stopped. + summary: Marks the A/B test as stopped parameters: - $ref: '../common/parameters.yml#/ID' responses: diff --git a/specs/analytics/paths/click/getAverageClickPosition.yml b/specs/analytics/paths/click/getAverageClickPosition.yml index 340719cd40..a1b7aef98d 100644 --- a/specs/analytics/paths/click/getAverageClickPosition.yml +++ b/specs/analytics/paths/click/getAverageClickPosition.yml @@ -1,7 +1,7 @@ get: operationId: getAverageClickPosition description: Returns the average click position. The endpoint returns a value for the complete given time range, as well as a value per day. - summary: Returns the average click position. + summary: Returns the average click position parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/click/getClickPositions.yml b/specs/analytics/paths/click/getClickPositions.yml index 849be96ce7..079d24c8ed 100644 --- a/specs/analytics/paths/click/getClickPositions.yml +++ b/specs/analytics/paths/click/getClickPositions.yml @@ -1,7 +1,7 @@ get: operationId: getClickPositions description: Returns the distribution of clicks per range of positions. - summary: Returns the distribution of clicks per range of positions. + summary: Returns the distribution of clicks per range of positions parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/click/getClickThroughRate.yml b/specs/analytics/paths/click/getClickThroughRate.yml index 63417ff2b5..9b6bc24158 100644 --- a/specs/analytics/paths/click/getClickThroughRate.yml +++ b/specs/analytics/paths/click/getClickThroughRate.yml @@ -1,7 +1,7 @@ get: operationId: getClickThroughRate description: Returns a click-through rate (CTR). The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of clicks and searches used to compute the rates. - summary: Returns a click-through rate (CTR). + summary: Returns a click-through rate (CTR) parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/click/getConversionRate.yml b/specs/analytics/paths/click/getConversionRate.yml index d00e345e12..c165815bbb 100644 --- a/specs/analytics/paths/click/getConversionRate.yml +++ b/specs/analytics/paths/click/getConversionRate.yml @@ -1,7 +1,7 @@ get: operationId: getConversationRate description: Returns a conversion rate (CR). The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of conversion and searches used to compute the rates. - summary: Returns a conversion rate (CR). + summary: Returns a conversion rate (CR) parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getNoClickRate.yml b/specs/analytics/paths/search/getNoClickRate.yml index 70d47b2506..813cfc9fa4 100644 --- a/specs/analytics/paths/search/getNoClickRate.yml +++ b/specs/analytics/paths/search/getNoClickRate.yml @@ -1,7 +1,7 @@ get: operationId: getNoClickRate description: Returns the rate at which searches didn't lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks. - summary: Returns the rate at which searches didn't lead to any clicks. + summary: Returns the rate at which searches didn't lead to any clicks parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getNoResultsRate.yml b/specs/analytics/paths/search/getNoResultsRate.yml index da99f3a269..5219e51940 100644 --- a/specs/analytics/paths/search/getNoResultsRate.yml +++ b/specs/analytics/paths/search/getNoResultsRate.yml @@ -1,7 +1,7 @@ get: operationId: getNoResultsRate description: Returns the rate at which searches didn't return any results. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without results used to compute the rates. - summary: Returns the rate at which searches didn't return any results. + summary: Returns the rate at which searches didn't return any results parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getSearchesCount.yml b/specs/analytics/paths/search/getSearchesCount.yml index 7d7a21afcd..b7c10e52be 100644 --- a/specs/analytics/paths/search/getSearchesCount.yml +++ b/specs/analytics/paths/search/getSearchesCount.yml @@ -1,7 +1,7 @@ get: operationId: getSearchesCount description: Returns the number of searches across the given time range. The endpoint returns a value for the complete given time range, as well as a value per day. - summary: Returns the number of searches across the given time range. + summary: Returns the number of searches across the given time range parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getSearchesNoClicks.yml b/specs/analytics/paths/search/getSearchesNoClicks.yml index 88e9187ed7..a782e9ac01 100644 --- a/specs/analytics/paths/search/getSearchesNoClicks.yml +++ b/specs/analytics/paths/search/getSearchesNoClicks.yml @@ -1,7 +1,7 @@ get: operationId: getSearchesNoClicks description: Returns top searches that didn't lead to any clicks. Limited to the 1000 most frequent ones. For each search, also returns the average number of found hits. - summary: Returns top searches that didn't lead to any clicks. + summary: Returns top searches that didn't lead to any clicks parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getSearchesNoResults.yml b/specs/analytics/paths/search/getSearchesNoResults.yml index dfc5cfaa94..1b4475fe4d 100644 --- a/specs/analytics/paths/search/getSearchesNoResults.yml +++ b/specs/analytics/paths/search/getSearchesNoResults.yml @@ -1,7 +1,7 @@ get: operationId: getSearchesNoResults description: Returns top searches that didn't return any results. Limited to the 1000 most frequent ones. - summary: Returns top searches that didn't return any results. + summary: Returns top searches that didn't return any results parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getTopCountries.yml b/specs/analytics/paths/search/getTopCountries.yml index b5ad701065..3a4c79854f 100644 --- a/specs/analytics/paths/search/getTopCountries.yml +++ b/specs/analytics/paths/search/getTopCountries.yml @@ -1,7 +1,7 @@ get: operationId: getTopCountries description: Returns top countries. Limited to the 1000 most frequent ones. - summary: Returns top countries. + summary: Returns top countries parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getTopFilterAttributes.yml b/specs/analytics/paths/search/getTopFilterAttributes.yml index ab9b8b5a7e..d90e2d224e 100644 --- a/specs/analytics/paths/search/getTopFilterAttributes.yml +++ b/specs/analytics/paths/search/getTopFilterAttributes.yml @@ -1,7 +1,7 @@ get: operationId: getTopFilterAttributes description: Returns top filter attributes. Limited to the 1000 most used filters. - summary: Returns top filter attributes. + summary: Returns top filter attributes parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../common/parameters.yml#/Search' diff --git a/specs/analytics/paths/search/getTopFilterForAttribute.yml b/specs/analytics/paths/search/getTopFilterForAttribute.yml index 2397fb38bd..73d75e7ea9 100644 --- a/specs/analytics/paths/search/getTopFilterForAttribute.yml +++ b/specs/analytics/paths/search/getTopFilterForAttribute.yml @@ -1,7 +1,7 @@ get: operationId: getTopFilterForAttribute description: Returns top filters for the given attribute. Limited to the 1000 most used filters. - summary: Returns top filters for the given attribute. + summary: Returns top filters for the given attribute parameters: - $ref: '../../common/parameters.yml#/Attribute' - $ref: '../../../common/parameters.yml#/Index' diff --git a/specs/analytics/paths/search/getTopFiltersNoResults.yml b/specs/analytics/paths/search/getTopFiltersNoResults.yml index d736501a5f..24df57bfcc 100644 --- a/specs/analytics/paths/search/getTopFiltersNoResults.yml +++ b/specs/analytics/paths/search/getTopFiltersNoResults.yml @@ -1,7 +1,7 @@ get: operationId: getTopFiltersNoResults description: Returns top filters with no results. Limited to the 1000 most used filters. - summary: Returns top filters with no results. + summary: Returns top filters with no results parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../common/parameters.yml#/Search' diff --git a/specs/analytics/paths/search/getTopHits.yml b/specs/analytics/paths/search/getTopHits.yml index f6541dbc00..ea6b4d6ed1 100644 --- a/specs/analytics/paths/search/getTopHits.yml +++ b/specs/analytics/paths/search/getTopHits.yml @@ -1,7 +1,7 @@ get: operationId: getTopHits description: Returns top hits. Limited to the 1000 most frequent ones. - summary: Returns top hits. + summary: Returns top hits parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../common/parameters.yml#/Search' diff --git a/specs/analytics/paths/search/getTopSearches.yml b/specs/analytics/paths/search/getTopSearches.yml index 4ff912fb5b..d64c5807c5 100644 --- a/specs/analytics/paths/search/getTopSearches.yml +++ b/specs/analytics/paths/search/getTopSearches.yml @@ -1,7 +1,7 @@ get: operationId: getTopSearches description: Returns top searches. Limited to the 1000 most frequent ones. For each search, also returns the average number of hits returned. - summary: Returns top searches. + summary: Returns top searches parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../common/parameters.yml#/ClickAnalytics' diff --git a/specs/analytics/paths/search/getUsersCount.yml b/specs/analytics/paths/search/getUsersCount.yml index 0b8e97785c..14bd5c2e75 100644 --- a/specs/analytics/paths/search/getUsersCount.yml +++ b/specs/analytics/paths/search/getUsersCount.yml @@ -1,7 +1,7 @@ get: operationId: getUsersCount description: Returns the distinct count of users across the given time range. The endpoint returns a value for the complete given time range, as well as a value per day. - summary: Returns the distinct count of users across the given time range. + summary: Returns the distinct count of users across the given time range parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/status/getStatus.yml b/specs/analytics/paths/status/getStatus.yml index efc0f6b8e9..3de91d7d3c 100644 --- a/specs/analytics/paths/status/getStatus.yml +++ b/specs/analytics/paths/status/getStatus.yml @@ -1,7 +1,7 @@ get: operationId: getStatus description: Returns the latest update time of the analytics API for a given index. If the index has been recently created and/or no search has been performed yet the updated time will be null. - summary: Get latest update time of the analytics API. + summary: Get latest update time of the analytics API parameters: - $ref: '../../../common/parameters.yml#/Index' responses: diff --git a/specs/common/schemas/CustomRequest.yml b/specs/common/schemas/CustomRequest.yml index 4ef34cef6c..91e81f868a 100644 --- a/specs/common/schemas/CustomRequest.yml +++ b/specs/common/schemas/CustomRequest.yml @@ -1,5 +1,5 @@ customRequest: - summary: Send requests to the Algolia REST API. + summary: Send requests to the Algolia REST API description: This method allow you to send requests to the Algolia REST API. parameters: - $ref: '#/PathInPath' diff --git a/specs/insights/paths/pushEvents.yml b/specs/insights/paths/pushEvents.yml index 135c27f538..26a3d53a09 100644 --- a/specs/insights/paths/pushEvents.yml +++ b/specs/insights/paths/pushEvents.yml @@ -1,7 +1,7 @@ post: operationId: pushEvents description: This command pushes an array of events. - summary: Pushes an array of events. + summary: Pushes an array of events requestBody: required: true content: diff --git a/specs/personalization/paths/deleteUserProfile.yml b/specs/personalization/paths/deleteUserProfile.yml index beed0e79b8..14c55ac5de 100644 --- a/specs/personalization/paths/deleteUserProfile.yml +++ b/specs/personalization/paths/deleteUserProfile.yml @@ -1,7 +1,7 @@ delete: operationId: deleteUserProfile description: Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means that if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours before for the deletion request to be fully processed. - summary: Delete the user profile and all its associated data. + summary: Delete the user profile and all its associated data parameters: - $ref: '../common/parameters.yml#/UserToken' responses: diff --git a/specs/personalization/paths/getUserTokenProfile.yml b/specs/personalization/paths/getUserTokenProfile.yml index 3fa6e63b8f..efada3a07e 100644 --- a/specs/personalization/paths/getUserTokenProfile.yml +++ b/specs/personalization/paths/getUserTokenProfile.yml @@ -1,7 +1,7 @@ get: operationId: getUserTokenProfile description: The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes. - summary: Get the user profile built from Personalization strategy. + summary: Get the user profile built from Personalization strategy parameters: - $ref: '../common/parameters.yml#/UserToken' responses: diff --git a/specs/personalization/paths/personalizationStrategy.yml b/specs/personalization/paths/personalizationStrategy.yml index c631461dd0..ce190b79e5 100644 --- a/specs/personalization/paths/personalizationStrategy.yml +++ b/specs/personalization/paths/personalizationStrategy.yml @@ -1,7 +1,7 @@ post: operationId: setPersonalizationStrategy description: A strategy defines the events and facets that impact user profiles and personalized search results. - summary: Set a new personalization strategy. + summary: Set a new personalization strategy requestBody: required: true content: @@ -34,7 +34,7 @@ post: get: operationId: getPersonalizationStrategy description: The strategy contains information on the events and facets that impact user profiles and personalized search results. - summary: Get the current personalization strategy. + summary: Get the current personalization strategy responses: '200': description: OK diff --git a/specs/predict/paths/fetchUserProfile.yml b/specs/predict/paths/fetchUserProfile.yml index 99860b3fe3..c978660bcc 100644 --- a/specs/predict/paths/fetchUserProfile.yml +++ b/specs/predict/paths/fetchUserProfile.yml @@ -1,7 +1,7 @@ post: operationId: fetchUserProfile description: Get predictions, properties (raw, computed or custom) and segments (computed or custom) for a user profile. - summary: Get user profile. + summary: Get user profile parameters: - $ref: '../common/parameters.yml#/userID' requestBody: diff --git a/specs/query-suggestions/paths/getConfigurationStatus.yml b/specs/query-suggestions/paths/getConfigurationStatus.yml index e4bda4611b..bdb24e5cc5 100644 --- a/specs/query-suggestions/paths/getConfigurationStatus.yml +++ b/specs/query-suggestions/paths/getConfigurationStatus.yml @@ -4,7 +4,7 @@ get: Get the status of a Query Suggestion's index. The status includes whether the Query Suggestions index is currently in the process of being built, and the last build time. - summary: Get the status of a Query Suggestion's index. + summary: Get the status of a Query Suggestion's index parameters: - $ref: '../../common/parameters.yml#/IndexName' responses: diff --git a/specs/query-suggestions/paths/getLogFile.yml b/specs/query-suggestions/paths/getLogFile.yml index a8798f9e27..250448be91 100644 --- a/specs/query-suggestions/paths/getLogFile.yml +++ b/specs/query-suggestions/paths/getLogFile.yml @@ -1,7 +1,7 @@ get: operationId: getLogFile description: Get the log file of the last build of a single Query Suggestion index. - summary: Get the log file of the last build of a single Query Suggestion index. + summary: Get the log file of the last build of a single Query Suggestion index parameters: - $ref: '../../common/parameters.yml#/IndexName' responses: diff --git a/specs/query-suggestions/paths/qsConfig.yml b/specs/query-suggestions/paths/qsConfig.yml index 00ec512bce..2e2dce3d36 100644 --- a/specs/query-suggestions/paths/qsConfig.yml +++ b/specs/query-suggestions/paths/qsConfig.yml @@ -1,7 +1,7 @@ put: operationId: updateConfig description: Update the configuration of a Query Suggestions index. - summary: Update the configuration of a Query Suggestions index. + summary: Update the configuration of a Query Suggestions index parameters: - $ref: '../../common/parameters.yml#/IndexName' requestBody: @@ -26,7 +26,7 @@ delete: By deleting a configuraton, you stop all updates to the underlying query suggestion index. Note that when doing this, the underlying index does not change - existing suggestions remain untouched. - summary: Delete a configuration of a Query Suggestion's index. + summary: Delete a configuration of a Query Suggestion's index parameters: - $ref: '../../common/parameters.yml#/IndexName' responses: @@ -42,7 +42,7 @@ delete: get: operationId: getConfig description: Get the configuration of a single Query Suggestions index. - summary: Get the configuration of a single Query Suggestions index. + summary: Get the configuration of a single Query Suggestions index parameters: - $ref: '../../common/parameters.yml#/IndexName' responses: diff --git a/specs/query-suggestions/paths/qsConfigs.yml b/specs/query-suggestions/paths/qsConfigs.yml index b9305b1bd8..431e9c2980 100644 --- a/specs/query-suggestions/paths/qsConfigs.yml +++ b/specs/query-suggestions/paths/qsConfigs.yml @@ -1,7 +1,7 @@ post: operationId: createConfig description: Create a configuration of a Query Suggestions index. There's a limit of 100 configurations per application. - summary: Create a configuration of a Query Suggestions index. + summary: Create a configuration of a Query Suggestions index requestBody: required: true content: @@ -28,7 +28,7 @@ get: Get all the configurations of Query Suggestions. For each index, you get a block of JSON with a list of its configuration settings. - summary: Get all the configurations of Query Suggestions. + summary: Get all the configurations of Query Suggestions responses: '200': description: OK diff --git a/specs/recommend/paths/getRecommendations.yml b/specs/recommend/paths/getRecommendations.yml index 54b39741a7..2831d30658 100644 --- a/specs/recommend/paths/getRecommendations.yml +++ b/specs/recommend/paths/getRecommendations.yml @@ -1,7 +1,7 @@ post: operationId: getRecommendations description: Returns recommendations for a specific model and objectID. - summary: Returns recommendations for a specific model and objectID. + summary: Returns recommendations for a specific model and objectID requestBody: required: true content: diff --git a/specs/search/paths/advanced/getLogs.yml b/specs/search/paths/advanced/getLogs.yml index 3ebd2733df..e1b7d4b03c 100644 --- a/specs/search/paths/advanced/getLogs.yml +++ b/specs/search/paths/advanced/getLogs.yml @@ -2,8 +2,8 @@ get: tags: - Advanced operationId: getLogs - description: Return the lastest log entries. - summary: Return the lastest log entries. + description: Return the latest log entries. + summary: Return the latest log entries parameters: - name: offset in: query diff --git a/specs/search/paths/advanced/getTask.yml b/specs/search/paths/advanced/getTask.yml index 5ae035c037..3f88f22b29 100644 --- a/specs/search/paths/advanced/getTask.yml +++ b/specs/search/paths/advanced/getTask.yml @@ -3,7 +3,7 @@ get: - Indices operationId: getTask description: Check the current status of a given task. - summary: Check the current status of a given task. + summary: Check the status of a task parameters: - $ref: '../../../common/parameters.yml#/IndexName' - name: taskID diff --git a/specs/search/paths/dictionaries/batchDictionaryEntries.yml b/specs/search/paths/dictionaries/batchDictionaryEntries.yml index 166a32512b..38727b6f28 100644 --- a/specs/search/paths/dictionaries/batchDictionaryEntries.yml +++ b/specs/search/paths/dictionaries/batchDictionaryEntries.yml @@ -3,7 +3,7 @@ post: - Dictionnaries operationId: batchDictionaryEntries description: Send a batch of dictionary entries. - summary: Send a batch of dictionary entries. + summary: Batch dictionary entries parameters: - $ref: 'common/parameters.yml#/DictionaryName' requestBody: diff --git a/specs/search/paths/dictionaries/dictionarySettings.yml b/specs/search/paths/dictionaries/dictionarySettings.yml index 7c04159b4b..dd78a486bc 100644 --- a/specs/search/paths/dictionaries/dictionarySettings.yml +++ b/specs/search/paths/dictionaries/dictionarySettings.yml @@ -3,7 +3,7 @@ get: - Dictionnaries operationId: getDictionarySettings description: Retrieve dictionaries settings. The API stores languages whose standard entries are disabled. Fetch settings does not return false values. - summary: Retrieve dictionaries settings. + summary: Retrieve dictionaries settings responses: '200': description: OK @@ -31,8 +31,8 @@ put: tags: - Dictionnaries operationId: setDictionarySettings - description: Set dictionary settings. - summary: Set dictionary settings. + description: Set dictionaries settings. + summary: Set dictionaries settings requestBody: required: true content: diff --git a/specs/search/paths/dictionaries/getDictionaryLanguages.yml b/specs/search/paths/dictionaries/getDictionaryLanguages.yml index 3f6ab474f2..34d46cc5c7 100644 --- a/specs/search/paths/dictionaries/getDictionaryLanguages.yml +++ b/specs/search/paths/dictionaries/getDictionaryLanguages.yml @@ -3,7 +3,7 @@ get: - Dictionnaries operationId: getDictionaryLanguages description: List dictionaries supported per language. - summary: List dictionaries supported per language. + summary: List available languages responses: '200': description: OK diff --git a/specs/search/paths/dictionaries/searchDictionaryEntries.yml b/specs/search/paths/dictionaries/searchDictionaryEntries.yml index 82b70d08ef..da9ea2fb40 100644 --- a/specs/search/paths/dictionaries/searchDictionaryEntries.yml +++ b/specs/search/paths/dictionaries/searchDictionaryEntries.yml @@ -3,7 +3,7 @@ post: - Dictionnaries operationId: searchDictionaryEntries description: Search the dictionary entries. - summary: Search the dictionary entries. + summary: Search a dictionary entries parameters: - $ref: 'common/parameters.yml#/DictionaryName' requestBody: diff --git a/specs/search/paths/keys/key.yml b/specs/search/paths/keys/key.yml index 74cf373a31..2200b3af80 100644 --- a/specs/search/paths/keys/key.yml +++ b/specs/search/paths/keys/key.yml @@ -2,7 +2,7 @@ get: tags: - Api Keys operationId: getApiKey - summary: Get an API key. + summary: Get an API key description: Get the permissions of an API key. parameters: - $ref: 'common/parameters.yml#/KeyString' @@ -26,7 +26,7 @@ put: tags: - Api Keys operationId: updateApiKey - summary: Update an API key. + summary: Update an API key description: Replace every permission of an existing API key. parameters: - $ref: 'common/parameters.yml#/KeyString' @@ -66,7 +66,7 @@ delete: tags: - Api Keys operationId: deleteApiKey - summary: Delete an API key. + summary: Delete an API key description: Delete an existing API Key. parameters: - $ref: 'common/parameters.yml#/KeyString' diff --git a/specs/search/paths/keys/keys.yml b/specs/search/paths/keys/keys.yml index 973f62df9b..99eb39cdcd 100644 --- a/specs/search/paths/keys/keys.yml +++ b/specs/search/paths/keys/keys.yml @@ -2,7 +2,7 @@ get: tags: - Api Keys operationId: listApiKeys - summary: Get the full list of API Keys. + summary: List API Keys description: List API keys, along with their associated rights. responses: '200': @@ -34,7 +34,7 @@ post: tags: - Api Keys operationId: addApiKey - summary: Create a new API key. + summary: Create an API key description: Add a new API Key with specific permissions/restrictions. requestBody: required: true diff --git a/specs/search/paths/keys/restoreApiKey.yml b/specs/search/paths/keys/restoreApiKey.yml index f98dcc9cdb..24c3f330e2 100644 --- a/specs/search/paths/keys/restoreApiKey.yml +++ b/specs/search/paths/keys/restoreApiKey.yml @@ -2,7 +2,7 @@ post: tags: - Api Keys operationId: restoreApiKey - summary: Restore an API key. + summary: Restore an API key description: Restore a deleted API key, along with its associated rights. parameters: - $ref: 'common/parameters.yml#/KeyString' diff --git a/specs/search/paths/manage_indices/listIndices.yml b/specs/search/paths/manage_indices/listIndices.yml index 3baf1de929..3f77ea7f6b 100644 --- a/specs/search/paths/manage_indices/listIndices.yml +++ b/specs/search/paths/manage_indices/listIndices.yml @@ -2,7 +2,7 @@ get: tags: - Indices operationId: listIndices - summary: List existing indexes. + summary: List existing indexes description: List existing indexes from an application. parameters: - $ref: '../../../common/parameters.yml#/Page' diff --git a/specs/search/paths/manage_indices/operationIndex.yml b/specs/search/paths/manage_indices/operationIndex.yml index 481e6c771d..5417c8fbee 100644 --- a/specs/search/paths/manage_indices/operationIndex.yml +++ b/specs/search/paths/manage_indices/operationIndex.yml @@ -2,7 +2,7 @@ post: tags: - Indices operationId: operationIndex - summary: Copy/move index. + summary: Copy/move index description: Peforms a copy or a move operation on a index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml index 68d90d36c4..0c4ce2ab9b 100644 --- a/specs/search/paths/multiclusters/hasPendingMappings.yml +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -2,7 +2,7 @@ get: tags: - Clusters operationId: hasPendingMappings - summary: Has pending mappings + summary: Get migration status description: > Get the status of your clusters' migrations or user creations. diff --git a/specs/search/paths/objects/batch.yml b/specs/search/paths/objects/batch.yml index 4796a744a0..a9882d1b31 100644 --- a/specs/search/paths/objects/batch.yml +++ b/specs/search/paths/objects/batch.yml @@ -2,8 +2,8 @@ post: tags: - Records operationId: batch - description: Performs multiple write operations in a single API call. - summary: Performs multiple write operations in a single API call. + description: Perform multiple write operations targetting one index, in a single API call. + summary: Batch operations to one index parameters: - $ref: '../../../common/parameters.yml#/IndexName' requestBody: diff --git a/specs/search/paths/objects/clearObjects.yml b/specs/search/paths/objects/clearObjects.yml index 883dda84f1..0bd55b05a2 100644 --- a/specs/search/paths/objects/clearObjects.yml +++ b/specs/search/paths/objects/clearObjects.yml @@ -2,7 +2,7 @@ post: tags: - Records operationId: clearObjects - summary: Clear all objects from an index. + summary: Clear all objects from an index description: Delete an index's content, but leave settings and index-specific API keys untouched. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/objects/deleteBy.yml b/specs/search/paths/objects/deleteBy.yml index bbd4b3e5ed..9f5cb0f36a 100644 --- a/specs/search/paths/objects/deleteBy.yml +++ b/specs/search/paths/objects/deleteBy.yml @@ -2,7 +2,7 @@ post: tags: - Records operationId: deleteBy - summary: Delete all records matching the query. + summary: Delete all records matching the query description: > Remove all objects matching a filter (including geo filters). diff --git a/specs/search/paths/objects/multipleBatch.yml b/specs/search/paths/objects/multipleBatch.yml index f3123785b9..7583b38677 100644 --- a/specs/search/paths/objects/multipleBatch.yml +++ b/specs/search/paths/objects/multipleBatch.yml @@ -3,7 +3,7 @@ post: - Records operationId: multipleBatch description: Perform multiple write operations, potentially targeting multiple indices, in a single API call. - summary: Perform multiple write operations. + summary: Batch operations to many indices requestBody: required: true content: diff --git a/specs/search/paths/objects/multipleGetObjects.yml b/specs/search/paths/objects/multipleGetObjects.yml index 5168a7efd7..9e3f662324 100644 --- a/specs/search/paths/objects/multipleGetObjects.yml +++ b/specs/search/paths/objects/multipleGetObjects.yml @@ -2,7 +2,7 @@ post: tags: - Records operationId: getObjects - summary: Retrieve one or more objects. + summary: Retrieve one or more objects description: Retrieve one or more objects, potentially from different indices, in a single API call. requestBody: required: true diff --git a/specs/search/paths/objects/object.yml b/specs/search/paths/objects/object.yml index fb43fc5a8c..1df979ed4e 100644 --- a/specs/search/paths/objects/object.yml +++ b/specs/search/paths/objects/object.yml @@ -2,7 +2,7 @@ get: tags: - Records operationId: getObject - summary: Retrieve one object from the index. + summary: Retrieve an object description: Retrieve one object from the index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' @@ -38,8 +38,11 @@ put: tags: - Records operationId: addOrUpdateObject - summary: Add or replace an object with a given object ID. - description: Add or replace an object with a given object ID. If the object does not exist, it will be created. If it already exists, it will be replaced. + summary: Add or replace an object + description: | + Add or replace an object with a given object ID. + If the object does not exist, it will be created. + If it already exists, it will be replaced. parameters: - $ref: '../../../common/parameters.yml#/IndexName' - $ref: '../../../common/parameters.yml#/ObjectID' @@ -66,7 +69,7 @@ delete: tags: - Records operationId: deleteObject - summary: Delete object. + summary: Delete an object description: Delete an existing object. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/objects/objects.yml b/specs/search/paths/objects/objects.yml index 1c3e21f03d..d7ff0a5347 100644 --- a/specs/search/paths/objects/objects.yml +++ b/specs/search/paths/objects/objects.yml @@ -3,7 +3,7 @@ post: - Records operationId: saveObject description: Add an object to the index, automatically assigning it an object ID. - summary: Add an object to the index. + summary: Add an object to the index parameters: - $ref: '../../../common/parameters.yml#/IndexName' requestBody: @@ -42,7 +42,7 @@ delete: tags: - Indices operationId: deleteIndex - summary: Delete index. + summary: Delete index description: Delete an existing index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/objects/partialUpdate.yml b/specs/search/paths/objects/partialUpdate.yml index ee31e3b20a..1266662545 100644 --- a/specs/search/paths/objects/partialUpdate.yml +++ b/specs/search/paths/objects/partialUpdate.yml @@ -2,7 +2,7 @@ post: tags: - Records operationId: partialUpdateObject - summary: Partially update an object. + summary: Partially update an object description: > Update one or more attributes of an existing object. diff --git a/specs/search/paths/rules/batchRules.yml b/specs/search/paths/rules/batchRules.yml index 89de89d4a9..cc1137e9bf 100644 --- a/specs/search/paths/rules/batchRules.yml +++ b/specs/search/paths/rules/batchRules.yml @@ -2,7 +2,7 @@ post: tags: - Rules operationId: batchRules - summary: Batch Rules. + summary: Batch Rules description: Create or update a batch of Rules. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/rules/clearRules.yml b/specs/search/paths/rules/clearRules.yml index fc7a88df3f..c2fd3e640b 100644 --- a/specs/search/paths/rules/clearRules.yml +++ b/specs/search/paths/rules/clearRules.yml @@ -2,7 +2,7 @@ post: tags: - Rules operationId: clearRules - summary: Clear Rules. + summary: Clear Rules description: Delete all Rules in the index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/rules/rule.yml b/specs/search/paths/rules/rule.yml index 2ef9e5e867..b53d76d009 100644 --- a/specs/search/paths/rules/rule.yml +++ b/specs/search/paths/rules/rule.yml @@ -2,7 +2,7 @@ get: tags: - Rules operationId: getRule - summary: Get a rule. + summary: Get a rule description: Retrieve the Rule with the specified objectID. parameters: - $ref: '../../../common/parameters.yml#/IndexName' @@ -27,7 +27,7 @@ put: tags: - Rules operationId: saveRule - summary: Save/Update a rule. + summary: Save/Update a rule description: Create or update the Rule with the specified objectID. parameters: - $ref: '../../../common/parameters.yml#/IndexName' @@ -59,7 +59,7 @@ delete: tags: - Rules operationId: deleteRule - summary: Delete a rule. + summary: Delete a rule description: Delete the Rule with the specified objectID. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/rules/searchRules.yml b/specs/search/paths/rules/searchRules.yml index ff4a4923b7..f2ddb12475 100644 --- a/specs/search/paths/rules/searchRules.yml +++ b/specs/search/paths/rules/searchRules.yml @@ -2,7 +2,7 @@ post: tags: - Rules operationId: searchRules - summary: Search for rules. + summary: Search for rules description: Search for rules matching various criteria. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/search/browse.yml b/specs/search/paths/search/browse.yml index b105e42288..2e1407f101 100644 --- a/specs/search/paths/search/browse.yml +++ b/specs/search/paths/search/browse.yml @@ -2,7 +2,7 @@ post: tags: - Search operationId: browse - summary: Retrieve all index content. + summary: Retrieve all index content description: > This method allows you to retrieve all index content. It can retrieve up to 1,000 records per call and supports full text search and filters. diff --git a/specs/search/paths/search/multipleQueries.yml b/specs/search/paths/search/multipleQueries.yml index 8d0cc66325..97f1bb4d08 100644 --- a/specs/search/paths/search/multipleQueries.yml +++ b/specs/search/paths/search/multipleQueries.yml @@ -2,8 +2,8 @@ post: tags: - Search operationId: multipleQueries - description: Get search results for the given requests. - summary: Get search results for the given requests. + summary: Search many indice + description: Perform a search operation targetting one or many indices. requestBody: required: true description: The `multipleQueries` requests and strategy. diff --git a/specs/search/paths/search/search.yml b/specs/search/paths/search/search.yml index a308d9f552..7d498d86f9 100644 --- a/specs/search/paths/search/search.yml +++ b/specs/search/paths/search/search.yml @@ -2,8 +2,8 @@ post: tags: - Search operationId: search - description: Get search results. - summary: Get search results. + summary: Search one index + description: Perform a search operation targetting one specific index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' requestBody: diff --git a/specs/search/paths/settings/settings.yml b/specs/search/paths/settings/settings.yml index ad6171f87d..e612e619b6 100644 --- a/specs/search/paths/settings/settings.yml +++ b/specs/search/paths/settings/settings.yml @@ -2,8 +2,8 @@ get: tags: - Indices operationId: getSettings - description: Retrieve settings of a given indexName. - summary: Retrieve settings of a given indexName. + description: Retrieve settings of an index. + summary: Retrieve settings of an index parameters: - $ref: '../../../common/parameters.yml#/IndexName' responses: @@ -26,8 +26,8 @@ put: tags: - Indices operationId: setSettings - description: Update settings of a given indexName. Only specified settings are overridden; unspecified settings are left unchanged. Specifying null for a setting resets it to its default value. - summary: Update settings of a given indexName. + description: Update settings of an indexName. Only specified settings are overridden; unspecified settings are left unchanged. Specifying null for a setting resets it to its default value. + summary: Update settings of an index parameters: - $ref: '../../../common/parameters.yml#/IndexName' - $ref: '../../../common/parameters.yml#/ForwardToReplicas' diff --git a/specs/search/paths/synonyms/batchSynonyms.yml b/specs/search/paths/synonyms/batchSynonyms.yml index cee4c98c9b..651989a145 100644 --- a/specs/search/paths/synonyms/batchSynonyms.yml +++ b/specs/search/paths/synonyms/batchSynonyms.yml @@ -2,7 +2,7 @@ post: tags: - Synonyms operationId: saveSynonyms - summary: Save a batch of synonyms. + summary: Save a batch of synonyms description: Create/update multiple synonym objects at once, potentially replacing the entire list of synonyms if replaceExistingSynonyms is true. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/synonyms/clearAllSynonyms.yml b/specs/search/paths/synonyms/clearAllSynonyms.yml index ad5346dca6..46f21519e3 100644 --- a/specs/search/paths/synonyms/clearAllSynonyms.yml +++ b/specs/search/paths/synonyms/clearAllSynonyms.yml @@ -2,7 +2,7 @@ post: tags: - Synonyms operationId: clearAllSynonyms - summary: Clear all synonyms. + summary: Clear all synonyms description: Remove all synonyms from an index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/synonyms/searchSynonyms.yml b/specs/search/paths/synonyms/searchSynonyms.yml index dc22fe1664..8c68d1b1cc 100644 --- a/specs/search/paths/synonyms/searchSynonyms.yml +++ b/specs/search/paths/synonyms/searchSynonyms.yml @@ -2,7 +2,7 @@ post: tags: - Synonyms operationId: searchSynonyms - summary: Get all synonyms that match a query. + summary: Search synonyms description: Search or browse all synonyms, optionally filtering them by type. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/synonyms/synonym.yml b/specs/search/paths/synonyms/synonym.yml index 0ad505d973..d739f9c86b 100644 --- a/specs/search/paths/synonyms/synonym.yml +++ b/specs/search/paths/synonyms/synonym.yml @@ -2,7 +2,7 @@ get: tags: - Synonyms operationId: getSynonym - summary: Get synonym. + summary: Get synonym description: Fetch a synonym object identified by its objectID. parameters: - $ref: '../../../common/parameters.yml#/IndexName' @@ -27,7 +27,7 @@ put: tags: - Synonyms operationId: saveSynonym - summary: Save synonym. + summary: Save synonym description: Create a new synonym object or update the existing synonym object with the given object ID. parameters: - $ref: '../../../common/parameters.yml#/IndexName' @@ -72,7 +72,7 @@ delete: tags: - Synonyms operationId: deleteSynonym - summary: Delete synonym. + summary: Delete synonym description: Delete a single synonyms set, identified by the given objectID. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/vault/appendSource.yml b/specs/search/paths/vault/appendSource.yml index 4b322da799..efd4c49a26 100644 --- a/specs/search/paths/vault/appendSource.yml +++ b/specs/search/paths/vault/appendSource.yml @@ -3,7 +3,7 @@ post: - Vaults operationId: appendSource description: Add a single source to the list of allowed sources. - summary: Add a single source. + summary: Add a single source requestBody: required: true description: The source to add. diff --git a/specs/search/paths/vault/deleteSource.yml b/specs/search/paths/vault/deleteSource.yml index 3e68188016..c6464564f5 100644 --- a/specs/search/paths/vault/deleteSource.yml +++ b/specs/search/paths/vault/deleteSource.yml @@ -3,7 +3,7 @@ delete: - Vaults operationId: deleteSource description: Remove a single source from the list of allowed sources. - summary: Remove a single source. + summary: Remove a single source parameters: - name: source in: path diff --git a/specs/search/paths/vault/vaultSources.yml b/specs/search/paths/vault/vaultSources.yml index e62edeb32f..52718adad9 100644 --- a/specs/search/paths/vault/vaultSources.yml +++ b/specs/search/paths/vault/vaultSources.yml @@ -3,7 +3,7 @@ get: - Vaults operationId: getSources description: List all allowed sources. - summary: List all allowed sources. + summary: List all allowed sources responses: '200': description: OK @@ -25,7 +25,7 @@ put: - Vaults operationId: replaceSources description: Replace all allowed sources. - summary: Replace all allowed sources. + summary: Replace all allowed sources requestBody: required: true description: The sources to allow. diff --git a/specs/search/spec.yml b/specs/search/spec.yml index bf2efc760d..dea747d475 100644 --- a/specs/search/spec.yml +++ b/specs/search/spec.yml @@ -69,7 +69,7 @@ x-tagGroups: - Rules - Synonyms - Dictionnaries - - name: Other + - name: Others tags: - Api Keys - Clusters diff --git a/specs/sources/paths/ingest/postUrl.yml b/specs/sources/paths/ingest/postUrl.yml index e87d37a362..8a5af096ef 100644 --- a/specs/sources/paths/ingest/postUrl.yml +++ b/specs/sources/paths/ingest/postUrl.yml @@ -1,6 +1,6 @@ post: operationId: postIngestUrl - summary: Create a new ingestion job via URL. + summary: Create a new ingestion job via URL description: Add an ingestion job that will fetch data from an URL. requestBody: required: true diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 5861e374d7..e0885a305f 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -69,6 +69,7 @@ function getSpecsForNavBar() { specs: getSpecsForPlugin(), theme: { options: { disableSearch: true }, + primaryColor: '#5468ff', theme: { typography: { fontSize: '14px', lineHeight: '1.2em' }, spacing: { From 65f8600166d82444ffca98b53cc2a14e9f130ef9 Mon Sep 17 00:00:00 2001 From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com> Date: Thu, 28 Apr 2022 17:55:42 +0200 Subject: [PATCH 2/8] s --- specs/search/paths/search/multipleQueries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/search/paths/search/multipleQueries.yml b/specs/search/paths/search/multipleQueries.yml index 97f1bb4d08..b93341ca1a 100644 --- a/specs/search/paths/search/multipleQueries.yml +++ b/specs/search/paths/search/multipleQueries.yml @@ -2,7 +2,7 @@ post: tags: - Search operationId: multipleQueries - summary: Search many indice + summary: Search many indices description: Perform a search operation targetting one or many indices. requestBody: required: true From 1cb56b20049bed5afd27210cde5df0fa43367560 Mon Sep 17 00:00:00 2001 From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com> Date: Fri, 29 Apr 2022 10:58:13 +0200 Subject: [PATCH 3/8] eslint --- .eslintrc.js | 2 +- eslint/package.json | 2 +- eslint/src/index.ts | 4 ++-- .../rules/{descriptionDot.ts => endWithDot.ts} | 16 ++++++++++------ .../{descriptionDot.test.ts => endWithDot.ts} | 4 ++-- specs/search/paths/advanced/getLogs.yml | 2 +- specs/search/paths/advanced/getTask.yml | 2 +- .../dictionaries/batchDictionaryEntries.yml | 2 +- .../paths/dictionaries/dictionarySettings.yml | 4 ++-- .../dictionaries/getDictionaryLanguages.yml | 2 +- .../dictionaries/searchDictionaryEntries.yml | 2 +- specs/search/paths/keys/key.yml | 6 +++--- specs/search/paths/keys/keys.yml | 4 ++-- specs/search/paths/keys/restoreApiKey.yml | 2 +- .../search/paths/manage_indices/listIndices.yml | 2 +- .../paths/manage_indices/operationIndex.yml | 2 +- .../paths/multiclusters/batchAssignUserIds.yml | 2 +- .../search/paths/multiclusters/getTopUserIds.yml | 2 +- .../paths/multiclusters/hasPendingMappings.yml | 2 +- .../search/paths/multiclusters/listClusters.yml | 2 +- .../search/paths/multiclusters/searchUserIds.yml | 2 +- specs/search/paths/multiclusters/userId.yml | 4 ++-- specs/search/paths/multiclusters/userIds.yml | 4 ++-- specs/search/paths/objects/batch.yml | 2 +- specs/search/paths/objects/clearObjects.yml | 2 +- specs/search/paths/objects/deleteBy.yml | 2 +- specs/search/paths/objects/multipleBatch.yml | 2 +- .../search/paths/objects/multipleGetObjects.yml | 2 +- specs/search/paths/objects/object.yml | 6 +++--- specs/search/paths/objects/objects.yml | 4 ++-- specs/search/paths/objects/partialUpdate.yml | 2 +- specs/search/paths/rules/batchRules.yml | 2 +- specs/search/paths/rules/clearRules.yml | 2 +- specs/search/paths/rules/rule.yml | 6 +++--- specs/search/paths/rules/searchRules.yml | 2 +- specs/search/paths/search/browse.yml | 2 +- specs/search/paths/search/multipleQueries.yml | 2 +- specs/search/paths/search/search.yml | 2 +- .../search/paths/search/searchForFacetValues.yml | 2 +- specs/search/paths/settings/settings.yml | 4 ++-- specs/search/paths/synonyms/batchSynonyms.yml | 2 +- specs/search/paths/synonyms/clearAllSynonyms.yml | 2 +- specs/search/paths/synonyms/searchSynonyms.yml | 2 +- specs/search/paths/synonyms/synonym.yml | 6 +++--- specs/search/paths/vault/appendSource.yml | 2 +- specs/search/paths/vault/deleteSource.yml | 2 +- specs/search/paths/vault/vaultSources.yml | 4 ++-- 47 files changed, 73 insertions(+), 69 deletions(-) rename eslint/src/rules/{descriptionDot.ts => endWithDot.ts} (80%) rename eslint/tests/{descriptionDot.test.ts => endWithDot.ts} (90%) diff --git a/.eslintrc.js b/.eslintrc.js index 837e1abfec..1dd164239e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -43,7 +43,7 @@ module.exports = { overrides: [{ files: ['specs/**/*.yml'], rules: { - "automation-custom/description-dot": "error", + "automation-custom/end-with-dot": "error", "automation-custom/single-quote-ref": "error", }, overrides: [ diff --git a/eslint/package.json b/eslint/package.json index 7797da68b8..cdabc5fe88 100644 --- a/eslint/package.json +++ b/eslint/package.json @@ -7,7 +7,7 @@ "src/**.ts" ], "scripts": { - "build": "tsc", + "build": "rm -rf dist/ && tsc", "test": "jest" }, "devDependencies": { diff --git a/eslint/src/index.ts b/eslint/src/index.ts index b7f30854ba..8a3bdffe4a 100644 --- a/eslint/src/index.ts +++ b/eslint/src/index.ts @@ -1,9 +1,9 @@ -import { descriptionDot } from './rules/descriptionDot'; +import { endWithDot } from './rules/endWithDot'; import { outOfLineEnum } from './rules/outOfLineEnum'; import { singleQuoteRef } from './rules/singleQuoteRef'; const rules = { - 'description-dot': descriptionDot, + 'end-with-dot': endWithDot, 'out-of-line-enum': outOfLineEnum, 'single-quote-ref': singleQuoteRef, }; diff --git a/eslint/src/rules/descriptionDot.ts b/eslint/src/rules/endWithDot.ts similarity index 80% rename from eslint/src/rules/descriptionDot.ts rename to eslint/src/rules/endWithDot.ts index 0fe438c6af..83a7284684 100644 --- a/eslint/src/rules/descriptionDot.ts +++ b/eslint/src/rules/endWithDot.ts @@ -1,15 +1,14 @@ -/* eslint-disable no-console */ import type { Rule } from 'eslint'; import { isBLockScalar, isPairWithKey, isScalar } from '../utils'; -export const descriptionDot: Rule.RuleModule = { +export const endWithDot: Rule.RuleModule = { meta: { docs: { - description: 'description must end with a dot', + description: '`description`, `summary` must end with a dot', }, messages: { - descriptionNoDot: 'description does not end with a dot', + endWithDot: 'content does not end with a dot', }, fixable: 'code', }, @@ -20,12 +19,17 @@ export const descriptionDot: Rule.RuleModule = { return { YAMLPair(node): void { - if (!isPairWithKey(node, 'description')) { + if ( + !isPairWithKey(node, 'description') && + !isPairWithKey(node, 'summary') + ) { return; } + if (!isScalar(node.value)) { return; } + const value = node.value; if ( typeof value.value !== 'string' || @@ -46,7 +50,7 @@ export const descriptionDot: Rule.RuleModule = { } context.report({ node: node as any, - messageId: 'descriptionNoDot', + messageId: 'endWithDot', fix(fixer) { return fixer.insertTextAfterRange( [0, value.range[1] - toTrim], diff --git a/eslint/tests/descriptionDot.test.ts b/eslint/tests/endWithDot.ts similarity index 90% rename from eslint/tests/descriptionDot.test.ts rename to eslint/tests/endWithDot.ts index 9db3323159..a4c0aa77aa 100644 --- a/eslint/tests/descriptionDot.test.ts +++ b/eslint/tests/endWithDot.ts @@ -1,12 +1,12 @@ import { RuleTester } from 'eslint'; -import { descriptionDot } from '../src/rules/descriptionDot'; +import { endWithDot } from '../src/rules/endWithDot'; const ruleTester = new RuleTester({ parser: require.resolve('yaml-eslint-parser'), }); -ruleTester.run('description-dot', descriptionDot, { +ruleTester.run('end-with-dot', endWithDot, { valid: [ ` simple: diff --git a/specs/search/paths/advanced/getLogs.yml b/specs/search/paths/advanced/getLogs.yml index e1b7d4b03c..55b6b5f3ad 100644 --- a/specs/search/paths/advanced/getLogs.yml +++ b/specs/search/paths/advanced/getLogs.yml @@ -3,7 +3,7 @@ get: - Advanced operationId: getLogs description: Return the latest log entries. - summary: Return the latest log entries + summary: Return the latest log entries. parameters: - name: offset in: query diff --git a/specs/search/paths/advanced/getTask.yml b/specs/search/paths/advanced/getTask.yml index 3f88f22b29..7a0b038180 100644 --- a/specs/search/paths/advanced/getTask.yml +++ b/specs/search/paths/advanced/getTask.yml @@ -3,7 +3,7 @@ get: - Indices operationId: getTask description: Check the current status of a given task. - summary: Check the status of a task + summary: Check the status of a task. parameters: - $ref: '../../../common/parameters.yml#/IndexName' - name: taskID diff --git a/specs/search/paths/dictionaries/batchDictionaryEntries.yml b/specs/search/paths/dictionaries/batchDictionaryEntries.yml index 38727b6f28..02814d06c4 100644 --- a/specs/search/paths/dictionaries/batchDictionaryEntries.yml +++ b/specs/search/paths/dictionaries/batchDictionaryEntries.yml @@ -3,7 +3,7 @@ post: - Dictionnaries operationId: batchDictionaryEntries description: Send a batch of dictionary entries. - summary: Batch dictionary entries + summary: Batch dictionary entries. parameters: - $ref: 'common/parameters.yml#/DictionaryName' requestBody: diff --git a/specs/search/paths/dictionaries/dictionarySettings.yml b/specs/search/paths/dictionaries/dictionarySettings.yml index dd78a486bc..516d4f0e4e 100644 --- a/specs/search/paths/dictionaries/dictionarySettings.yml +++ b/specs/search/paths/dictionaries/dictionarySettings.yml @@ -3,7 +3,7 @@ get: - Dictionnaries operationId: getDictionarySettings description: Retrieve dictionaries settings. The API stores languages whose standard entries are disabled. Fetch settings does not return false values. - summary: Retrieve dictionaries settings + summary: Retrieve dictionaries settings. responses: '200': description: OK @@ -32,7 +32,7 @@ put: - Dictionnaries operationId: setDictionarySettings description: Set dictionaries settings. - summary: Set dictionaries settings + summary: Set dictionaries settings. requestBody: required: true content: diff --git a/specs/search/paths/dictionaries/getDictionaryLanguages.yml b/specs/search/paths/dictionaries/getDictionaryLanguages.yml index 34d46cc5c7..215569241e 100644 --- a/specs/search/paths/dictionaries/getDictionaryLanguages.yml +++ b/specs/search/paths/dictionaries/getDictionaryLanguages.yml @@ -3,7 +3,7 @@ get: - Dictionnaries operationId: getDictionaryLanguages description: List dictionaries supported per language. - summary: List available languages + summary: List available languages. responses: '200': description: OK diff --git a/specs/search/paths/dictionaries/searchDictionaryEntries.yml b/specs/search/paths/dictionaries/searchDictionaryEntries.yml index da9ea2fb40..f941d30b8a 100644 --- a/specs/search/paths/dictionaries/searchDictionaryEntries.yml +++ b/specs/search/paths/dictionaries/searchDictionaryEntries.yml @@ -3,7 +3,7 @@ post: - Dictionnaries operationId: searchDictionaryEntries description: Search the dictionary entries. - summary: Search a dictionary entries + summary: Search a dictionary entries. parameters: - $ref: 'common/parameters.yml#/DictionaryName' requestBody: diff --git a/specs/search/paths/keys/key.yml b/specs/search/paths/keys/key.yml index 2200b3af80..74cf373a31 100644 --- a/specs/search/paths/keys/key.yml +++ b/specs/search/paths/keys/key.yml @@ -2,7 +2,7 @@ get: tags: - Api Keys operationId: getApiKey - summary: Get an API key + summary: Get an API key. description: Get the permissions of an API key. parameters: - $ref: 'common/parameters.yml#/KeyString' @@ -26,7 +26,7 @@ put: tags: - Api Keys operationId: updateApiKey - summary: Update an API key + summary: Update an API key. description: Replace every permission of an existing API key. parameters: - $ref: 'common/parameters.yml#/KeyString' @@ -66,7 +66,7 @@ delete: tags: - Api Keys operationId: deleteApiKey - summary: Delete an API key + summary: Delete an API key. description: Delete an existing API Key. parameters: - $ref: 'common/parameters.yml#/KeyString' diff --git a/specs/search/paths/keys/keys.yml b/specs/search/paths/keys/keys.yml index 99eb39cdcd..4b61fc81a7 100644 --- a/specs/search/paths/keys/keys.yml +++ b/specs/search/paths/keys/keys.yml @@ -2,7 +2,7 @@ get: tags: - Api Keys operationId: listApiKeys - summary: List API Keys + summary: List API Keys. description: List API keys, along with their associated rights. responses: '200': @@ -34,7 +34,7 @@ post: tags: - Api Keys operationId: addApiKey - summary: Create an API key + summary: Create an API key. description: Add a new API Key with specific permissions/restrictions. requestBody: required: true diff --git a/specs/search/paths/keys/restoreApiKey.yml b/specs/search/paths/keys/restoreApiKey.yml index 24c3f330e2..f98dcc9cdb 100644 --- a/specs/search/paths/keys/restoreApiKey.yml +++ b/specs/search/paths/keys/restoreApiKey.yml @@ -2,7 +2,7 @@ post: tags: - Api Keys operationId: restoreApiKey - summary: Restore an API key + summary: Restore an API key. description: Restore a deleted API key, along with its associated rights. parameters: - $ref: 'common/parameters.yml#/KeyString' diff --git a/specs/search/paths/manage_indices/listIndices.yml b/specs/search/paths/manage_indices/listIndices.yml index 3f77ea7f6b..3baf1de929 100644 --- a/specs/search/paths/manage_indices/listIndices.yml +++ b/specs/search/paths/manage_indices/listIndices.yml @@ -2,7 +2,7 @@ get: tags: - Indices operationId: listIndices - summary: List existing indexes + summary: List existing indexes. description: List existing indexes from an application. parameters: - $ref: '../../../common/parameters.yml#/Page' diff --git a/specs/search/paths/manage_indices/operationIndex.yml b/specs/search/paths/manage_indices/operationIndex.yml index 5417c8fbee..481e6c771d 100644 --- a/specs/search/paths/manage_indices/operationIndex.yml +++ b/specs/search/paths/manage_indices/operationIndex.yml @@ -2,7 +2,7 @@ post: tags: - Indices operationId: operationIndex - summary: Copy/move index + summary: Copy/move index. description: Peforms a copy or a move operation on a index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index 3eaca26d58..5137965c15 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -2,7 +2,7 @@ post: tags: - Clusters operationId: batchAssignUserIds - summary: Batch assign userIDs + summary: Batch assign userIDs. description: > Assign multiple userIDs to a cluster. diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml index bf88a5653a..159fcaf633 100644 --- a/specs/search/paths/multiclusters/getTopUserIds.yml +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -2,7 +2,7 @@ get: tags: - Clusters operationId: getTopUserIds - summary: Get top userID + summary: Get top userID. description: > Get the top 10 userIDs with the highest number of records per cluster. diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml index 0c4ce2ab9b..15f0aae502 100644 --- a/specs/search/paths/multiclusters/hasPendingMappings.yml +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -2,7 +2,7 @@ get: tags: - Clusters operationId: hasPendingMappings - summary: Get migration status + summary: Get migration status. description: > Get the status of your clusters' migrations or user creations. diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml index 042e83d6f1..397000faed 100644 --- a/specs/search/paths/multiclusters/listClusters.yml +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -2,7 +2,7 @@ get: tags: - Clusters operationId: listClusters - summary: List clusters + summary: List clusters. description: > List the clusters available in a multi-clusters setup for a single appID. diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 7cef657b0c..565ebe69c8 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -2,7 +2,7 @@ post: tags: - Clusters operationId: searchUserIds - summary: Search userID + summary: Search userID. description: > Search for userIDs. diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index b083acc0b3..bc69af232b 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -2,7 +2,7 @@ get: tags: - Clusters operationId: getUserId - summary: Get userID + summary: Get userID. description: > Returns the userID data stored in the mapping. @@ -31,7 +31,7 @@ delete: tags: - Clusters operationId: removeUserId - summary: Remove userID + summary: Remove userID. description: > Remove a userID and its associated data from the multi-clusters. diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index a6887975c8..144d71a146 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -2,7 +2,7 @@ post: tags: - Clusters operationId: assignUserId - summary: Assign or Move userID + summary: Assign or Move userID. description: > Assign or Move a userID to a cluster. @@ -43,7 +43,7 @@ get: tags: - Clusters operationId: listUserIds - summary: List userIDs + summary: List userIDs. description: > List the userIDs assigned to a multi-clusters appID. diff --git a/specs/search/paths/objects/batch.yml b/specs/search/paths/objects/batch.yml index a9882d1b31..c0598df510 100644 --- a/specs/search/paths/objects/batch.yml +++ b/specs/search/paths/objects/batch.yml @@ -3,7 +3,7 @@ post: - Records operationId: batch description: Perform multiple write operations targetting one index, in a single API call. - summary: Batch operations to one index + summary: Batch operations to one index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' requestBody: diff --git a/specs/search/paths/objects/clearObjects.yml b/specs/search/paths/objects/clearObjects.yml index 0bd55b05a2..883dda84f1 100644 --- a/specs/search/paths/objects/clearObjects.yml +++ b/specs/search/paths/objects/clearObjects.yml @@ -2,7 +2,7 @@ post: tags: - Records operationId: clearObjects - summary: Clear all objects from an index + summary: Clear all objects from an index. description: Delete an index's content, but leave settings and index-specific API keys untouched. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/objects/deleteBy.yml b/specs/search/paths/objects/deleteBy.yml index 9f5cb0f36a..bbd4b3e5ed 100644 --- a/specs/search/paths/objects/deleteBy.yml +++ b/specs/search/paths/objects/deleteBy.yml @@ -2,7 +2,7 @@ post: tags: - Records operationId: deleteBy - summary: Delete all records matching the query + summary: Delete all records matching the query. description: > Remove all objects matching a filter (including geo filters). diff --git a/specs/search/paths/objects/multipleBatch.yml b/specs/search/paths/objects/multipleBatch.yml index 7583b38677..e93a854fc2 100644 --- a/specs/search/paths/objects/multipleBatch.yml +++ b/specs/search/paths/objects/multipleBatch.yml @@ -3,7 +3,7 @@ post: - Records operationId: multipleBatch description: Perform multiple write operations, potentially targeting multiple indices, in a single API call. - summary: Batch operations to many indices + summary: Batch operations to many indices. requestBody: required: true content: diff --git a/specs/search/paths/objects/multipleGetObjects.yml b/specs/search/paths/objects/multipleGetObjects.yml index 9e3f662324..5168a7efd7 100644 --- a/specs/search/paths/objects/multipleGetObjects.yml +++ b/specs/search/paths/objects/multipleGetObjects.yml @@ -2,7 +2,7 @@ post: tags: - Records operationId: getObjects - summary: Retrieve one or more objects + summary: Retrieve one or more objects. description: Retrieve one or more objects, potentially from different indices, in a single API call. requestBody: required: true diff --git a/specs/search/paths/objects/object.yml b/specs/search/paths/objects/object.yml index 1df979ed4e..8268ec3043 100644 --- a/specs/search/paths/objects/object.yml +++ b/specs/search/paths/objects/object.yml @@ -2,7 +2,7 @@ get: tags: - Records operationId: getObject - summary: Retrieve an object + summary: Retrieve an object. description: Retrieve one object from the index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' @@ -38,7 +38,7 @@ put: tags: - Records operationId: addOrUpdateObject - summary: Add or replace an object + summary: Add or replace an object. description: | Add or replace an object with a given object ID. If the object does not exist, it will be created. @@ -69,7 +69,7 @@ delete: tags: - Records operationId: deleteObject - summary: Delete an object + summary: Delete an object. description: Delete an existing object. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/objects/objects.yml b/specs/search/paths/objects/objects.yml index d7ff0a5347..1c3e21f03d 100644 --- a/specs/search/paths/objects/objects.yml +++ b/specs/search/paths/objects/objects.yml @@ -3,7 +3,7 @@ post: - Records operationId: saveObject description: Add an object to the index, automatically assigning it an object ID. - summary: Add an object to the index + summary: Add an object to the index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' requestBody: @@ -42,7 +42,7 @@ delete: tags: - Indices operationId: deleteIndex - summary: Delete index + summary: Delete index. description: Delete an existing index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/objects/partialUpdate.yml b/specs/search/paths/objects/partialUpdate.yml index 1266662545..ee31e3b20a 100644 --- a/specs/search/paths/objects/partialUpdate.yml +++ b/specs/search/paths/objects/partialUpdate.yml @@ -2,7 +2,7 @@ post: tags: - Records operationId: partialUpdateObject - summary: Partially update an object + summary: Partially update an object. description: > Update one or more attributes of an existing object. diff --git a/specs/search/paths/rules/batchRules.yml b/specs/search/paths/rules/batchRules.yml index cc1137e9bf..89de89d4a9 100644 --- a/specs/search/paths/rules/batchRules.yml +++ b/specs/search/paths/rules/batchRules.yml @@ -2,7 +2,7 @@ post: tags: - Rules operationId: batchRules - summary: Batch Rules + summary: Batch Rules. description: Create or update a batch of Rules. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/rules/clearRules.yml b/specs/search/paths/rules/clearRules.yml index c2fd3e640b..fc7a88df3f 100644 --- a/specs/search/paths/rules/clearRules.yml +++ b/specs/search/paths/rules/clearRules.yml @@ -2,7 +2,7 @@ post: tags: - Rules operationId: clearRules - summary: Clear Rules + summary: Clear Rules. description: Delete all Rules in the index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/rules/rule.yml b/specs/search/paths/rules/rule.yml index b53d76d009..2ef9e5e867 100644 --- a/specs/search/paths/rules/rule.yml +++ b/specs/search/paths/rules/rule.yml @@ -2,7 +2,7 @@ get: tags: - Rules operationId: getRule - summary: Get a rule + summary: Get a rule. description: Retrieve the Rule with the specified objectID. parameters: - $ref: '../../../common/parameters.yml#/IndexName' @@ -27,7 +27,7 @@ put: tags: - Rules operationId: saveRule - summary: Save/Update a rule + summary: Save/Update a rule. description: Create or update the Rule with the specified objectID. parameters: - $ref: '../../../common/parameters.yml#/IndexName' @@ -59,7 +59,7 @@ delete: tags: - Rules operationId: deleteRule - summary: Delete a rule + summary: Delete a rule. description: Delete the Rule with the specified objectID. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/rules/searchRules.yml b/specs/search/paths/rules/searchRules.yml index f2ddb12475..ff4a4923b7 100644 --- a/specs/search/paths/rules/searchRules.yml +++ b/specs/search/paths/rules/searchRules.yml @@ -2,7 +2,7 @@ post: tags: - Rules operationId: searchRules - summary: Search for rules + summary: Search for rules. description: Search for rules matching various criteria. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/search/browse.yml b/specs/search/paths/search/browse.yml index 2e1407f101..b105e42288 100644 --- a/specs/search/paths/search/browse.yml +++ b/specs/search/paths/search/browse.yml @@ -2,7 +2,7 @@ post: tags: - Search operationId: browse - summary: Retrieve all index content + summary: Retrieve all index content. description: > This method allows you to retrieve all index content. It can retrieve up to 1,000 records per call and supports full text search and filters. diff --git a/specs/search/paths/search/multipleQueries.yml b/specs/search/paths/search/multipleQueries.yml index b93341ca1a..42148868bf 100644 --- a/specs/search/paths/search/multipleQueries.yml +++ b/specs/search/paths/search/multipleQueries.yml @@ -2,7 +2,7 @@ post: tags: - Search operationId: multipleQueries - summary: Search many indices + summary: Search many indices. description: Perform a search operation targetting one or many indices. requestBody: required: true diff --git a/specs/search/paths/search/search.yml b/specs/search/paths/search/search.yml index 7d498d86f9..3cac345792 100644 --- a/specs/search/paths/search/search.yml +++ b/specs/search/paths/search/search.yml @@ -2,7 +2,7 @@ post: tags: - Search operationId: search - summary: Search one index + summary: Search one index. description: Perform a search operation targetting one specific index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/search/searchForFacetValues.yml b/specs/search/paths/search/searchForFacetValues.yml index 831929c64d..afff2acac7 100644 --- a/specs/search/paths/search/searchForFacetValues.yml +++ b/specs/search/paths/search/searchForFacetValues.yml @@ -2,7 +2,7 @@ post: tags: - Search operationId: searchForFacetValues - summary: Search for values of a given facet + summary: Search for values of a given facet. description: Search for values of a given facet, optionally restricting the returned values to those contained in objects matching other search criteria. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/settings/settings.yml b/specs/search/paths/settings/settings.yml index e612e619b6..5368cb53c6 100644 --- a/specs/search/paths/settings/settings.yml +++ b/specs/search/paths/settings/settings.yml @@ -3,7 +3,7 @@ get: - Indices operationId: getSettings description: Retrieve settings of an index. - summary: Retrieve settings of an index + summary: Retrieve settings of an index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' responses: @@ -27,7 +27,7 @@ put: - Indices operationId: setSettings description: Update settings of an indexName. Only specified settings are overridden; unspecified settings are left unchanged. Specifying null for a setting resets it to its default value. - summary: Update settings of an index + summary: Update settings of an index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' - $ref: '../../../common/parameters.yml#/ForwardToReplicas' diff --git a/specs/search/paths/synonyms/batchSynonyms.yml b/specs/search/paths/synonyms/batchSynonyms.yml index 651989a145..cee4c98c9b 100644 --- a/specs/search/paths/synonyms/batchSynonyms.yml +++ b/specs/search/paths/synonyms/batchSynonyms.yml @@ -2,7 +2,7 @@ post: tags: - Synonyms operationId: saveSynonyms - summary: Save a batch of synonyms + summary: Save a batch of synonyms. description: Create/update multiple synonym objects at once, potentially replacing the entire list of synonyms if replaceExistingSynonyms is true. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/synonyms/clearAllSynonyms.yml b/specs/search/paths/synonyms/clearAllSynonyms.yml index 46f21519e3..ad5346dca6 100644 --- a/specs/search/paths/synonyms/clearAllSynonyms.yml +++ b/specs/search/paths/synonyms/clearAllSynonyms.yml @@ -2,7 +2,7 @@ post: tags: - Synonyms operationId: clearAllSynonyms - summary: Clear all synonyms + summary: Clear all synonyms. description: Remove all synonyms from an index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/synonyms/searchSynonyms.yml b/specs/search/paths/synonyms/searchSynonyms.yml index 8c68d1b1cc..b256cadcda 100644 --- a/specs/search/paths/synonyms/searchSynonyms.yml +++ b/specs/search/paths/synonyms/searchSynonyms.yml @@ -2,7 +2,7 @@ post: tags: - Synonyms operationId: searchSynonyms - summary: Search synonyms + summary: Search synonyms. description: Search or browse all synonyms, optionally filtering them by type. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/synonyms/synonym.yml b/specs/search/paths/synonyms/synonym.yml index d739f9c86b..0ad505d973 100644 --- a/specs/search/paths/synonyms/synonym.yml +++ b/specs/search/paths/synonyms/synonym.yml @@ -2,7 +2,7 @@ get: tags: - Synonyms operationId: getSynonym - summary: Get synonym + summary: Get synonym. description: Fetch a synonym object identified by its objectID. parameters: - $ref: '../../../common/parameters.yml#/IndexName' @@ -27,7 +27,7 @@ put: tags: - Synonyms operationId: saveSynonym - summary: Save synonym + summary: Save synonym. description: Create a new synonym object or update the existing synonym object with the given object ID. parameters: - $ref: '../../../common/parameters.yml#/IndexName' @@ -72,7 +72,7 @@ delete: tags: - Synonyms operationId: deleteSynonym - summary: Delete synonym + summary: Delete synonym. description: Delete a single synonyms set, identified by the given objectID. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/vault/appendSource.yml b/specs/search/paths/vault/appendSource.yml index efd4c49a26..4b322da799 100644 --- a/specs/search/paths/vault/appendSource.yml +++ b/specs/search/paths/vault/appendSource.yml @@ -3,7 +3,7 @@ post: - Vaults operationId: appendSource description: Add a single source to the list of allowed sources. - summary: Add a single source + summary: Add a single source. requestBody: required: true description: The source to add. diff --git a/specs/search/paths/vault/deleteSource.yml b/specs/search/paths/vault/deleteSource.yml index c6464564f5..3e68188016 100644 --- a/specs/search/paths/vault/deleteSource.yml +++ b/specs/search/paths/vault/deleteSource.yml @@ -3,7 +3,7 @@ delete: - Vaults operationId: deleteSource description: Remove a single source from the list of allowed sources. - summary: Remove a single source + summary: Remove a single source. parameters: - name: source in: path diff --git a/specs/search/paths/vault/vaultSources.yml b/specs/search/paths/vault/vaultSources.yml index 52718adad9..e62edeb32f 100644 --- a/specs/search/paths/vault/vaultSources.yml +++ b/specs/search/paths/vault/vaultSources.yml @@ -3,7 +3,7 @@ get: - Vaults operationId: getSources description: List all allowed sources. - summary: List all allowed sources + summary: List all allowed sources. responses: '200': description: OK @@ -25,7 +25,7 @@ put: - Vaults operationId: replaceSources description: Replace all allowed sources. - summary: Replace all allowed sources + summary: Replace all allowed sources. requestBody: required: true description: The sources to allow. From 3d07b0b4a5afc551d51fb6596a235ee828136432 Mon Sep 17 00:00:00 2001 From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com> Date: Fri, 29 Apr 2022 11:08:47 +0200 Subject: [PATCH 4/8] review --- scripts/buildSpecs.ts | 28 +++++++++++++------ specs/abtesting/paths/abtest.yml | 4 +-- specs/abtesting/paths/abtests.yml | 4 +-- specs/abtesting/paths/stopABTest.yml | 2 +- .../paths/click/getAverageClickPosition.yml | 2 +- .../paths/click/getClickPositions.yml | 2 +- .../paths/click/getClickThroughRate.yml | 2 +- .../paths/click/getConversionRate.yml | 2 +- .../analytics/paths/search/getNoClickRate.yml | 2 +- .../paths/search/getNoResultsRate.yml | 2 +- .../paths/search/getSearchesCount.yml | 2 +- .../paths/search/getSearchesNoClicks.yml | 2 +- .../paths/search/getSearchesNoResults.yml | 2 +- .../paths/search/getTopCountries.yml | 2 +- .../paths/search/getTopFilterAttributes.yml | 2 +- .../paths/search/getTopFilterForAttribute.yml | 2 +- .../paths/search/getTopFiltersNoResults.yml | 2 +- specs/analytics/paths/search/getTopHits.yml | 2 +- .../analytics/paths/search/getTopSearches.yml | 2 +- .../analytics/paths/search/getUsersCount.yml | 2 +- specs/analytics/paths/status/getStatus.yml | 2 +- specs/common/schemas/CustomRequest.yml | 2 +- specs/insights/paths/pushEvents.yml | 2 +- .../paths/deleteUserProfile.yml | 2 +- .../paths/getUserTokenProfile.yml | 2 +- .../paths/personalizationStrategy.yml | 4 +-- specs/predict/paths/fetchUserProfile.yml | 2 +- .../paths/getConfigurationStatus.yml | 2 +- specs/query-suggestions/paths/getLogFile.yml | 2 +- specs/query-suggestions/paths/qsConfig.yml | 6 ++-- specs/query-suggestions/paths/qsConfigs.yml | 4 +-- specs/recommend/paths/getRecommendations.yml | 2 +- specs/sources/paths/ingest/postUrl.yml | 2 +- 33 files changed, 57 insertions(+), 47 deletions(-) diff --git a/scripts/buildSpecs.ts b/scripts/buildSpecs.ts index e8ec2a1559..1b4547f40f 100644 --- a/scripts/buildSpecs.ts +++ b/scripts/buildSpecs.ts @@ -19,7 +19,10 @@ const ALGOLIASEARCH_LITE_OPERATIONS = [ 'post', ]; -async function propagateTagsToOperations({ +/** + * This function will transform properties in the bundle depending on the context. + */ +async function transformBundle({ bundledPath, withDoc, clientName, @@ -50,16 +53,23 @@ async function propagateTagsToOperations({ // because open-api-generator will use this to determine the name of the client specMethod.tags = [clientName]; - if ( - !withDoc || - !bundledDocSpec || - !bundledDocSpec.paths[pathKey][method].tags - ) { + // Doc special cases + if (!withDoc || !bundledDocSpec) { + continue; + } + + const docMethod = bundledDocSpec.paths[pathKey][method]; + if (docMethod.summary) { + // Remove dot at the end of summary for better sidebar display + docMethod.summary = docMethod.summary.replace(/\.$/gm, ''); + } + + if (!docMethod.tags) { continue; } // Checks that specified tags are well defined at root level - for (const tag of bundledDocSpec.paths[pathKey][method].tags) { + for (const tag of docMethod.tags) { if (tag === clientName || (alias && tag === alias)) { return; } @@ -162,7 +172,7 @@ async function buildLiteSpec({ const liteBundledPath = `specs/bundled/${spec}.${outputFormat}`; await fsp.writeFile(toAbsolutePath(liteBundledPath), yaml.dump(parsed)); - await propagateTagsToOperations({ + await transformBundle({ bundledPath: toAbsolutePath(liteBundledPath), clientName: spec, // Lite does not need documentation because it's just a subset @@ -223,7 +233,7 @@ async function buildSpec( // Add the correct tags to be able to generate the proper client if (!isLite) { - await propagateTagsToOperations({ + await transformBundle({ bundledPath: toAbsolutePath(bundledPath), clientName: spec, withDoc: BUNDLE_WITH_DOC, diff --git a/specs/abtesting/paths/abtest.yml b/specs/abtesting/paths/abtest.yml index 9550596d53..91c4b14e22 100644 --- a/specs/abtesting/paths/abtest.yml +++ b/specs/abtesting/paths/abtest.yml @@ -4,7 +4,7 @@ get: Returns metadata and metrics for A/B test id. Behaves in the same way as GET /2/abtests however the endpoint will return 403. - summary: Returns metadata and metrics for A/B test id + summary: Returns metadata and metrics for A/B test id. parameters: - $ref: '../common/parameters.yml#/ID' responses: @@ -26,7 +26,7 @@ get: delete: operationId: deleteABTest description: Deletes the A/B Test and removes all associated metadata & metrics. - summary: Deletes the A/B Test + summary: Deletes the A/B Test. parameters: - $ref: '../common/parameters.yml#/ID' responses: diff --git a/specs/abtesting/paths/abtests.yml b/specs/abtesting/paths/abtests.yml index b98696544d..8f075a5a86 100644 --- a/specs/abtesting/paths/abtests.yml +++ b/specs/abtesting/paths/abtests.yml @@ -4,7 +4,7 @@ post: Creates a new A/B test with provided configuration. You can set an A/B test on two different indices with different settings, or on the same index with different search parameters by providing a customSearchParameters setting on one of the variants. - summary: Creates a new A/B test with provided configuration + summary: Creates a new A/B test with provided configuration. requestBody: required: true content: @@ -49,7 +49,7 @@ get: operationId: listABTests description: > Fetch all existing A/B tests for App that are available for the current API Key. Returns an array of metadata and metrics. When no data has been processed, the metrics will be returned as null. - summary: Fetch all existing A/B tests for App that are available for the current API Key + summary: Fetch all existing A/B tests for App that are available for the current API Key. parameters: - $ref: '../../common/parameters.yml#/Offset' - $ref: '../../common/parameters.yml#/Limit' diff --git a/specs/abtesting/paths/stopABTest.yml b/specs/abtesting/paths/stopABTest.yml index b08a66c69c..33cc821b9a 100644 --- a/specs/abtesting/paths/stopABTest.yml +++ b/specs/abtesting/paths/stopABTest.yml @@ -6,7 +6,7 @@ post: At this point, the test is over and cannot be restarted. As a result, your application is back to normal: index A will perform as usual, receiving 100% of all search requests. Associated metadata and metrics are still stored. - summary: Marks the A/B test as stopped + summary: Marks the A/B test as stopped. parameters: - $ref: '../common/parameters.yml#/ID' responses: diff --git a/specs/analytics/paths/click/getAverageClickPosition.yml b/specs/analytics/paths/click/getAverageClickPosition.yml index a1b7aef98d..340719cd40 100644 --- a/specs/analytics/paths/click/getAverageClickPosition.yml +++ b/specs/analytics/paths/click/getAverageClickPosition.yml @@ -1,7 +1,7 @@ get: operationId: getAverageClickPosition description: Returns the average click position. The endpoint returns a value for the complete given time range, as well as a value per day. - summary: Returns the average click position + summary: Returns the average click position. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/click/getClickPositions.yml b/specs/analytics/paths/click/getClickPositions.yml index 079d24c8ed..849be96ce7 100644 --- a/specs/analytics/paths/click/getClickPositions.yml +++ b/specs/analytics/paths/click/getClickPositions.yml @@ -1,7 +1,7 @@ get: operationId: getClickPositions description: Returns the distribution of clicks per range of positions. - summary: Returns the distribution of clicks per range of positions + summary: Returns the distribution of clicks per range of positions. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/click/getClickThroughRate.yml b/specs/analytics/paths/click/getClickThroughRate.yml index 9b6bc24158..63417ff2b5 100644 --- a/specs/analytics/paths/click/getClickThroughRate.yml +++ b/specs/analytics/paths/click/getClickThroughRate.yml @@ -1,7 +1,7 @@ get: operationId: getClickThroughRate description: Returns a click-through rate (CTR). The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of clicks and searches used to compute the rates. - summary: Returns a click-through rate (CTR) + summary: Returns a click-through rate (CTR). parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/click/getConversionRate.yml b/specs/analytics/paths/click/getConversionRate.yml index c165815bbb..d00e345e12 100644 --- a/specs/analytics/paths/click/getConversionRate.yml +++ b/specs/analytics/paths/click/getConversionRate.yml @@ -1,7 +1,7 @@ get: operationId: getConversationRate description: Returns a conversion rate (CR). The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of conversion and searches used to compute the rates. - summary: Returns a conversion rate (CR) + summary: Returns a conversion rate (CR). parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getNoClickRate.yml b/specs/analytics/paths/search/getNoClickRate.yml index 813cfc9fa4..70d47b2506 100644 --- a/specs/analytics/paths/search/getNoClickRate.yml +++ b/specs/analytics/paths/search/getNoClickRate.yml @@ -1,7 +1,7 @@ get: operationId: getNoClickRate description: Returns the rate at which searches didn't lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks. - summary: Returns the rate at which searches didn't lead to any clicks + summary: Returns the rate at which searches didn't lead to any clicks. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getNoResultsRate.yml b/specs/analytics/paths/search/getNoResultsRate.yml index 5219e51940..da99f3a269 100644 --- a/specs/analytics/paths/search/getNoResultsRate.yml +++ b/specs/analytics/paths/search/getNoResultsRate.yml @@ -1,7 +1,7 @@ get: operationId: getNoResultsRate description: Returns the rate at which searches didn't return any results. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without results used to compute the rates. - summary: Returns the rate at which searches didn't return any results + summary: Returns the rate at which searches didn't return any results. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getSearchesCount.yml b/specs/analytics/paths/search/getSearchesCount.yml index b7c10e52be..7d7a21afcd 100644 --- a/specs/analytics/paths/search/getSearchesCount.yml +++ b/specs/analytics/paths/search/getSearchesCount.yml @@ -1,7 +1,7 @@ get: operationId: getSearchesCount description: Returns the number of searches across the given time range. The endpoint returns a value for the complete given time range, as well as a value per day. - summary: Returns the number of searches across the given time range + summary: Returns the number of searches across the given time range. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getSearchesNoClicks.yml b/specs/analytics/paths/search/getSearchesNoClicks.yml index a782e9ac01..88e9187ed7 100644 --- a/specs/analytics/paths/search/getSearchesNoClicks.yml +++ b/specs/analytics/paths/search/getSearchesNoClicks.yml @@ -1,7 +1,7 @@ get: operationId: getSearchesNoClicks description: Returns top searches that didn't lead to any clicks. Limited to the 1000 most frequent ones. For each search, also returns the average number of found hits. - summary: Returns top searches that didn't lead to any clicks + summary: Returns top searches that didn't lead to any clicks. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getSearchesNoResults.yml b/specs/analytics/paths/search/getSearchesNoResults.yml index 1b4475fe4d..dfc5cfaa94 100644 --- a/specs/analytics/paths/search/getSearchesNoResults.yml +++ b/specs/analytics/paths/search/getSearchesNoResults.yml @@ -1,7 +1,7 @@ get: operationId: getSearchesNoResults description: Returns top searches that didn't return any results. Limited to the 1000 most frequent ones. - summary: Returns top searches that didn't return any results + summary: Returns top searches that didn't return any results. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getTopCountries.yml b/specs/analytics/paths/search/getTopCountries.yml index 3a4c79854f..b5ad701065 100644 --- a/specs/analytics/paths/search/getTopCountries.yml +++ b/specs/analytics/paths/search/getTopCountries.yml @@ -1,7 +1,7 @@ get: operationId: getTopCountries description: Returns top countries. Limited to the 1000 most frequent ones. - summary: Returns top countries + summary: Returns top countries. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getTopFilterAttributes.yml b/specs/analytics/paths/search/getTopFilterAttributes.yml index d90e2d224e..ab9b8b5a7e 100644 --- a/specs/analytics/paths/search/getTopFilterAttributes.yml +++ b/specs/analytics/paths/search/getTopFilterAttributes.yml @@ -1,7 +1,7 @@ get: operationId: getTopFilterAttributes description: Returns top filter attributes. Limited to the 1000 most used filters. - summary: Returns top filter attributes + summary: Returns top filter attributes. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../common/parameters.yml#/Search' diff --git a/specs/analytics/paths/search/getTopFilterForAttribute.yml b/specs/analytics/paths/search/getTopFilterForAttribute.yml index 73d75e7ea9..2397fb38bd 100644 --- a/specs/analytics/paths/search/getTopFilterForAttribute.yml +++ b/specs/analytics/paths/search/getTopFilterForAttribute.yml @@ -1,7 +1,7 @@ get: operationId: getTopFilterForAttribute description: Returns top filters for the given attribute. Limited to the 1000 most used filters. - summary: Returns top filters for the given attribute + summary: Returns top filters for the given attribute. parameters: - $ref: '../../common/parameters.yml#/Attribute' - $ref: '../../../common/parameters.yml#/Index' diff --git a/specs/analytics/paths/search/getTopFiltersNoResults.yml b/specs/analytics/paths/search/getTopFiltersNoResults.yml index 24df57bfcc..d736501a5f 100644 --- a/specs/analytics/paths/search/getTopFiltersNoResults.yml +++ b/specs/analytics/paths/search/getTopFiltersNoResults.yml @@ -1,7 +1,7 @@ get: operationId: getTopFiltersNoResults description: Returns top filters with no results. Limited to the 1000 most used filters. - summary: Returns top filters with no results + summary: Returns top filters with no results. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../common/parameters.yml#/Search' diff --git a/specs/analytics/paths/search/getTopHits.yml b/specs/analytics/paths/search/getTopHits.yml index ea6b4d6ed1..f6541dbc00 100644 --- a/specs/analytics/paths/search/getTopHits.yml +++ b/specs/analytics/paths/search/getTopHits.yml @@ -1,7 +1,7 @@ get: operationId: getTopHits description: Returns top hits. Limited to the 1000 most frequent ones. - summary: Returns top hits + summary: Returns top hits. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../common/parameters.yml#/Search' diff --git a/specs/analytics/paths/search/getTopSearches.yml b/specs/analytics/paths/search/getTopSearches.yml index d64c5807c5..4ff912fb5b 100644 --- a/specs/analytics/paths/search/getTopSearches.yml +++ b/specs/analytics/paths/search/getTopSearches.yml @@ -1,7 +1,7 @@ get: operationId: getTopSearches description: Returns top searches. Limited to the 1000 most frequent ones. For each search, also returns the average number of hits returned. - summary: Returns top searches + summary: Returns top searches. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../common/parameters.yml#/ClickAnalytics' diff --git a/specs/analytics/paths/search/getUsersCount.yml b/specs/analytics/paths/search/getUsersCount.yml index 14bd5c2e75..0b8e97785c 100644 --- a/specs/analytics/paths/search/getUsersCount.yml +++ b/specs/analytics/paths/search/getUsersCount.yml @@ -1,7 +1,7 @@ get: operationId: getUsersCount description: Returns the distinct count of users across the given time range. The endpoint returns a value for the complete given time range, as well as a value per day. - summary: Returns the distinct count of users across the given time range + summary: Returns the distinct count of users across the given time range. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/status/getStatus.yml b/specs/analytics/paths/status/getStatus.yml index 3de91d7d3c..efc0f6b8e9 100644 --- a/specs/analytics/paths/status/getStatus.yml +++ b/specs/analytics/paths/status/getStatus.yml @@ -1,7 +1,7 @@ get: operationId: getStatus description: Returns the latest update time of the analytics API for a given index. If the index has been recently created and/or no search has been performed yet the updated time will be null. - summary: Get latest update time of the analytics API + summary: Get latest update time of the analytics API. parameters: - $ref: '../../../common/parameters.yml#/Index' responses: diff --git a/specs/common/schemas/CustomRequest.yml b/specs/common/schemas/CustomRequest.yml index 91e81f868a..4ef34cef6c 100644 --- a/specs/common/schemas/CustomRequest.yml +++ b/specs/common/schemas/CustomRequest.yml @@ -1,5 +1,5 @@ customRequest: - summary: Send requests to the Algolia REST API + summary: Send requests to the Algolia REST API. description: This method allow you to send requests to the Algolia REST API. parameters: - $ref: '#/PathInPath' diff --git a/specs/insights/paths/pushEvents.yml b/specs/insights/paths/pushEvents.yml index 26a3d53a09..135c27f538 100644 --- a/specs/insights/paths/pushEvents.yml +++ b/specs/insights/paths/pushEvents.yml @@ -1,7 +1,7 @@ post: operationId: pushEvents description: This command pushes an array of events. - summary: Pushes an array of events + summary: Pushes an array of events. requestBody: required: true content: diff --git a/specs/personalization/paths/deleteUserProfile.yml b/specs/personalization/paths/deleteUserProfile.yml index 14c55ac5de..beed0e79b8 100644 --- a/specs/personalization/paths/deleteUserProfile.yml +++ b/specs/personalization/paths/deleteUserProfile.yml @@ -1,7 +1,7 @@ delete: operationId: deleteUserProfile description: Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means that if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours before for the deletion request to be fully processed. - summary: Delete the user profile and all its associated data + summary: Delete the user profile and all its associated data. parameters: - $ref: '../common/parameters.yml#/UserToken' responses: diff --git a/specs/personalization/paths/getUserTokenProfile.yml b/specs/personalization/paths/getUserTokenProfile.yml index efada3a07e..3fa6e63b8f 100644 --- a/specs/personalization/paths/getUserTokenProfile.yml +++ b/specs/personalization/paths/getUserTokenProfile.yml @@ -1,7 +1,7 @@ get: operationId: getUserTokenProfile description: The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes. - summary: Get the user profile built from Personalization strategy + summary: Get the user profile built from Personalization strategy. parameters: - $ref: '../common/parameters.yml#/UserToken' responses: diff --git a/specs/personalization/paths/personalizationStrategy.yml b/specs/personalization/paths/personalizationStrategy.yml index ce190b79e5..c631461dd0 100644 --- a/specs/personalization/paths/personalizationStrategy.yml +++ b/specs/personalization/paths/personalizationStrategy.yml @@ -1,7 +1,7 @@ post: operationId: setPersonalizationStrategy description: A strategy defines the events and facets that impact user profiles and personalized search results. - summary: Set a new personalization strategy + summary: Set a new personalization strategy. requestBody: required: true content: @@ -34,7 +34,7 @@ post: get: operationId: getPersonalizationStrategy description: The strategy contains information on the events and facets that impact user profiles and personalized search results. - summary: Get the current personalization strategy + summary: Get the current personalization strategy. responses: '200': description: OK diff --git a/specs/predict/paths/fetchUserProfile.yml b/specs/predict/paths/fetchUserProfile.yml index c978660bcc..99860b3fe3 100644 --- a/specs/predict/paths/fetchUserProfile.yml +++ b/specs/predict/paths/fetchUserProfile.yml @@ -1,7 +1,7 @@ post: operationId: fetchUserProfile description: Get predictions, properties (raw, computed or custom) and segments (computed or custom) for a user profile. - summary: Get user profile + summary: Get user profile. parameters: - $ref: '../common/parameters.yml#/userID' requestBody: diff --git a/specs/query-suggestions/paths/getConfigurationStatus.yml b/specs/query-suggestions/paths/getConfigurationStatus.yml index bdb24e5cc5..e4bda4611b 100644 --- a/specs/query-suggestions/paths/getConfigurationStatus.yml +++ b/specs/query-suggestions/paths/getConfigurationStatus.yml @@ -4,7 +4,7 @@ get: Get the status of a Query Suggestion's index. The status includes whether the Query Suggestions index is currently in the process of being built, and the last build time. - summary: Get the status of a Query Suggestion's index + summary: Get the status of a Query Suggestion's index. parameters: - $ref: '../../common/parameters.yml#/IndexName' responses: diff --git a/specs/query-suggestions/paths/getLogFile.yml b/specs/query-suggestions/paths/getLogFile.yml index 250448be91..a8798f9e27 100644 --- a/specs/query-suggestions/paths/getLogFile.yml +++ b/specs/query-suggestions/paths/getLogFile.yml @@ -1,7 +1,7 @@ get: operationId: getLogFile description: Get the log file of the last build of a single Query Suggestion index. - summary: Get the log file of the last build of a single Query Suggestion index + summary: Get the log file of the last build of a single Query Suggestion index. parameters: - $ref: '../../common/parameters.yml#/IndexName' responses: diff --git a/specs/query-suggestions/paths/qsConfig.yml b/specs/query-suggestions/paths/qsConfig.yml index 2e2dce3d36..00ec512bce 100644 --- a/specs/query-suggestions/paths/qsConfig.yml +++ b/specs/query-suggestions/paths/qsConfig.yml @@ -1,7 +1,7 @@ put: operationId: updateConfig description: Update the configuration of a Query Suggestions index. - summary: Update the configuration of a Query Suggestions index + summary: Update the configuration of a Query Suggestions index. parameters: - $ref: '../../common/parameters.yml#/IndexName' requestBody: @@ -26,7 +26,7 @@ delete: By deleting a configuraton, you stop all updates to the underlying query suggestion index. Note that when doing this, the underlying index does not change - existing suggestions remain untouched. - summary: Delete a configuration of a Query Suggestion's index + summary: Delete a configuration of a Query Suggestion's index. parameters: - $ref: '../../common/parameters.yml#/IndexName' responses: @@ -42,7 +42,7 @@ delete: get: operationId: getConfig description: Get the configuration of a single Query Suggestions index. - summary: Get the configuration of a single Query Suggestions index + summary: Get the configuration of a single Query Suggestions index. parameters: - $ref: '../../common/parameters.yml#/IndexName' responses: diff --git a/specs/query-suggestions/paths/qsConfigs.yml b/specs/query-suggestions/paths/qsConfigs.yml index 431e9c2980..b9305b1bd8 100644 --- a/specs/query-suggestions/paths/qsConfigs.yml +++ b/specs/query-suggestions/paths/qsConfigs.yml @@ -1,7 +1,7 @@ post: operationId: createConfig description: Create a configuration of a Query Suggestions index. There's a limit of 100 configurations per application. - summary: Create a configuration of a Query Suggestions index + summary: Create a configuration of a Query Suggestions index. requestBody: required: true content: @@ -28,7 +28,7 @@ get: Get all the configurations of Query Suggestions. For each index, you get a block of JSON with a list of its configuration settings. - summary: Get all the configurations of Query Suggestions + summary: Get all the configurations of Query Suggestions. responses: '200': description: OK diff --git a/specs/recommend/paths/getRecommendations.yml b/specs/recommend/paths/getRecommendations.yml index 2831d30658..54b39741a7 100644 --- a/specs/recommend/paths/getRecommendations.yml +++ b/specs/recommend/paths/getRecommendations.yml @@ -1,7 +1,7 @@ post: operationId: getRecommendations description: Returns recommendations for a specific model and objectID. - summary: Returns recommendations for a specific model and objectID + summary: Returns recommendations for a specific model and objectID. requestBody: required: true content: diff --git a/specs/sources/paths/ingest/postUrl.yml b/specs/sources/paths/ingest/postUrl.yml index 8a5af096ef..e87d37a362 100644 --- a/specs/sources/paths/ingest/postUrl.yml +++ b/specs/sources/paths/ingest/postUrl.yml @@ -1,6 +1,6 @@ post: operationId: postIngestUrl - summary: Create a new ingestion job via URL + summary: Create a new ingestion job via URL. description: Add an ingestion job that will fetch data from an URL. requestBody: required: true From 6a3afbe8b934fc655d66287956eefac7f2d35d40 Mon Sep 17 00:00:00 2001 From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com> Date: Fri, 29 Apr 2022 11:43:41 +0200 Subject: [PATCH 5/8] bump cache --- .github/.cache_version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/.cache_version b/.github/.cache_version index deeb3d66ef..45acc9e667 100644 --- a/.github/.cache_version +++ b/.github/.cache_version @@ -1 +1 @@ -9.2.0 +9.2.1 From 3c9a77ea4c2eecd80234b4d104808dd939fa75dc Mon Sep 17 00:00:00 2001 From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com> Date: Fri, 29 Apr 2022 13:47:39 +0200 Subject: [PATCH 6/8] review --- scripts/buildSpecs.ts | 5 +++++ specs/search/paths/objects/batch.yml | 2 +- specs/search/paths/search/multipleQueries.yml | 4 ++-- specs/search/paths/search/search.yml | 4 ++-- specs/search/paths/settings/settings.yml | 2 +- website/docs/api-clients/migration-guide.mdx | 2 +- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/scripts/buildSpecs.ts b/scripts/buildSpecs.ts index 1b4547f40f..a4bf9f40a0 100644 --- a/scripts/buildSpecs.ts +++ b/scripts/buildSpecs.ts @@ -21,6 +21,11 @@ const ALGOLIASEARCH_LITE_OPERATIONS = [ /** * This function will transform properties in the bundle depending on the context. + * E.g: + * - Check tags definition + * - Add name of the client in tags + * - Remove unecessary punctuation for documentation + * - etc... */ async function transformBundle({ bundledPath, diff --git a/specs/search/paths/objects/batch.yml b/specs/search/paths/objects/batch.yml index c0598df510..75bb7643b0 100644 --- a/specs/search/paths/objects/batch.yml +++ b/specs/search/paths/objects/batch.yml @@ -2,8 +2,8 @@ post: tags: - Records operationId: batch - description: Perform multiple write operations targetting one index, in a single API call. summary: Batch operations to one index. + description: Perform multiple write operations targeting one index, in a single API call. parameters: - $ref: '../../../common/parameters.yml#/IndexName' requestBody: diff --git a/specs/search/paths/search/multipleQueries.yml b/specs/search/paths/search/multipleQueries.yml index 42148868bf..049d504b24 100644 --- a/specs/search/paths/search/multipleQueries.yml +++ b/specs/search/paths/search/multipleQueries.yml @@ -2,8 +2,8 @@ post: tags: - Search operationId: multipleQueries - summary: Search many indices. - description: Perform a search operation targetting one or many indices. + summary: Search multiple indices. + description: Perform a search operation targeting one or many indices. requestBody: required: true description: The `multipleQueries` requests and strategy. diff --git a/specs/search/paths/search/search.yml b/specs/search/paths/search/search.yml index 3cac345792..977cea7184 100644 --- a/specs/search/paths/search/search.yml +++ b/specs/search/paths/search/search.yml @@ -2,8 +2,8 @@ post: tags: - Search operationId: search - summary: Search one index. - description: Perform a search operation targetting one specific index. + summary: Search in an index. + description: Perform a search operation targeting one specific index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' requestBody: diff --git a/specs/search/paths/settings/settings.yml b/specs/search/paths/settings/settings.yml index 5368cb53c6..129b900be2 100644 --- a/specs/search/paths/settings/settings.yml +++ b/specs/search/paths/settings/settings.yml @@ -26,7 +26,7 @@ put: tags: - Indices operationId: setSettings - description: Update settings of an indexName. Only specified settings are overridden; unspecified settings are left unchanged. Specifying null for a setting resets it to its default value. + description: Update settings of an index. Only specified settings are overridden; unspecified settings are left unchanged. Specifying null for a setting resets it to its default value. summary: Update settings of an index. parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/website/docs/api-clients/migration-guide.mdx b/website/docs/api-clients/migration-guide.mdx index 97cf3a1609..1e00da8f74 100644 --- a/website/docs/api-clients/migration-guide.mdx +++ b/website/docs/api-clients/migration-guide.mdx @@ -103,7 +103,7 @@ You can continue this guide on [our installation page](/docs/api-clients/install -### Methods targetting an `indexName` +### Methods targeting an `indexName` Date: Fri, 29 Apr 2022 17:02:07 +0200 Subject: [PATCH 7/8] chore(ci): make the cache not depends on generated files (#458) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément Vannicatte --- .github/actions/cache/action.yml | 56 ++++--------------- .github/actions/setup/action.yml | 4 -- .github/workflows/check.yml | 14 ++--- .../CHANGELOG.md | 9 +++ scripts/ci/createMatrix.ts | 2 + scripts/release/create-release-issue.ts | 24 +++----- 6 files changed, 35 insertions(+), 74 deletions(-) create mode 100644 clients/algoliasearch-client-javascript/CHANGELOG.md diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 5a43e68126..3213b3a79f 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -15,6 +15,9 @@ inputs: spec: description: The name of the spec to restore, used for client matrix gen. required: false + specPath: + description: The path of the spec to hash + required: false runs: using: composite @@ -45,14 +48,14 @@ runs: # Restore bundled specs from input: used during 'client' generation - name: Restore ${{ inputs.spec }} built spec - if: ${{ inputs.job == 'client' && inputs.spec }} + if: ${{ inputs.job == 'client' && inputs.spec && inputs.specPath }} uses: actions/cache@v3 with: path: ${{ format('specs/bundled/{0}.yml', inputs.spec) }} key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - format('specs/{0}/**', inputs.spec), + format('specs/{0}/**', inputs.specPath), 'specs/common/**' )}} @@ -220,10 +223,11 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/algoliasearch/**', - 'clients/algoliasearch-client-javascript/packages/client-search/**', - 'clients/algoliasearch-client-javascript/packages/client-analytics/**', - 'clients/algoliasearch-client-javascript/packages/client-personalization/**' + 'specs/bundled/search.yml', + 'specs/bundled/analytics.yml', + 'specs/bundled/personalization.yml', + 'templates/javascript/**', + 'generators/src/**' )}} - name: Restore built JavaScript algoliasearch-lite client @@ -234,10 +238,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/algoliasearch-lite/src/**', - 'clients/algoliasearch-client-javascript/packages/algoliasearch-lite/model/**', - 'clients/algoliasearch-client-javascript/packages/algoliasearch-lite/builds/**', - 'clients/algoliasearch-client-javascript/packages/algoliasearch-lite/package.json', 'specs/bundled/algoliasearch-lite.yml', 'templates/javascript/**', 'generators/src/**' @@ -251,10 +251,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-search/src/**', - 'clients/algoliasearch-client-javascript/packages/client-search/model/**', - 'clients/algoliasearch-client-javascript/packages/client-search/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-search/package.json', 'specs/bundled/search.yml', 'templates/javascript/**', 'generators/src/**' @@ -268,10 +264,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/recommend/src/**', - 'clients/algoliasearch-client-javascript/packages/recommend/model/**', - 'clients/algoliasearch-client-javascript/packages/recommend/builds/**', - 'clients/algoliasearch-client-javascript/packages/recommend/package.json', 'specs/bundled/recommend.yml', 'templates/javascript/**', 'generators/src/**' @@ -285,10 +277,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/**', - 'clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/**', - 'clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-query-suggestions/package.json', 'specs/bundled/query-suggestions.yml', 'templates/javascript/**', 'generators/src/**' @@ -302,10 +290,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-personalization/src/**', - 'clients/algoliasearch-client-javascript/packages/client-personalization/model/**', - 'clients/algoliasearch-client-javascript/packages/client-personalization/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-personalization/package.json', 'specs/bundled/personalization.yml', 'templates/javascript/**', 'generators/src/**' @@ -319,10 +303,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-analytics/src/**', - 'clients/algoliasearch-client-javascript/packages/client-analytics/model/**', - 'clients/algoliasearch-client-javascript/packages/client-analytics/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-analytics/package.json', 'specs/bundled/analytics.yml', 'templates/javascript/**', 'generators/src/**' @@ -336,10 +316,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-abtesting/src/**', - 'clients/algoliasearch-client-javascript/packages/client-abtesting/model/**', - 'clients/algoliasearch-client-javascript/packages/client-abtesting/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-abtesting/package.json', 'specs/bundled/abtesting.yml', 'templates/javascript/**', 'generators/src/**' @@ -353,10 +329,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-insights/src/**', - 'clients/algoliasearch-client-javascript/packages/client-insights/model/**', - 'clients/algoliasearch-client-javascript/packages/client-insights/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-insights/package.json', 'specs/bundled/insights.yml', 'templates/javascript/**', 'generators/src/**' @@ -370,10 +342,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-sources/src/**', - 'clients/algoliasearch-client-javascript/packages/client-sources/model/**', - 'clients/algoliasearch-client-javascript/packages/client-sources/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-sources/package.json', 'specs/bundled/sources.yml', 'templates/javascript/**', 'generators/src/**' @@ -387,10 +355,6 @@ runs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/client-predict/src/**', - 'clients/algoliasearch-client-javascript/packages/client-predict/model/**', - 'clients/algoliasearch-client-javascript/packages/client-predict/builds/**', - 'clients/algoliasearch-client-javascript/packages/client-predict/package.json', 'specs/bundled/predict.yml', 'templates/javascript/**', 'generators/src/**' diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 35fd369c38..7d84e384db 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -13,10 +13,6 @@ inputs: runs: using: composite steps: - - name: Read current GitHub Actions cache version - shell: bash - run: echo "CACHE_VERSION=$(< .github/.cache_version)" >> $GITHUB_ENV - - name: Install Node uses: actions/setup-node@v2 with: diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 3cbb0ecb7d..dd16cae1ab 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -172,6 +172,7 @@ jobs: job: client language: javascript spec: ${{ matrix.client.name }} + specPath: ${{ matrix.client.specPath }} cache_hash: ${{ needs.setup.outputs.CACHE_COMMON_HASH }} - name: Cache '${{ matrix.client.name }}' client @@ -182,10 +183,6 @@ jobs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - format('{0}/src/**', matrix.client.path), - format('{0}/model/**', matrix.client.path), - format('{0}/builds/**', matrix.client.path), - format('{0}/package.json', matrix.client.path), format('specs/bundled/{0}.yml', matrix.client.name), 'templates/javascript/**', 'generators/src/**' @@ -334,10 +331,11 @@ jobs: key: | ${{ env.CACHE_VERSION }}-${{ hashFiles( - 'clients/algoliasearch-client-javascript/packages/algoliasearch/**', - 'clients/algoliasearch-client-javascript/packages/client-search/**', - 'clients/algoliasearch-client-javascript/packages/client-analytics/**', - 'clients/algoliasearch-client-javascript/packages/client-personalization/**' + 'specs/bundled/search.yml', + 'specs/bundled/analytics.yml', + 'specs/bundled/personalization.yml', + 'templates/javascript/**', + 'generators/src/**' )}} - name: Build 'algoliasearch' client diff --git a/clients/algoliasearch-client-javascript/CHANGELOG.md b/clients/algoliasearch-client-javascript/CHANGELOG.md new file mode 100644 index 0000000000..3dea669959 --- /dev/null +++ b/clients/algoliasearch-client-javascript/CHANGELOG.md @@ -0,0 +1,9 @@ +## [0.1.1](https://github.com/algolia/algoliasearch-client-javascript/compare/0.1.0...0.1.1) + +### javascript +- c80d0647 fix(spec): predict server (#441) +- 12f246e7 chore: use `Client` suffix (#386) +- be7400be fix(javascript): update version (#448) +- b9677335 fix(javascript): add missing descriptions (#416) +- cd565ca3 chore(javascript): fix npm publish issue (#409) + diff --git a/scripts/ci/createMatrix.ts b/scripts/ci/createMatrix.ts index 74143bd598..69c5dc69df 100644 --- a/scripts/ci/createMatrix.ts +++ b/scripts/ci/createMatrix.ts @@ -20,6 +20,7 @@ type ClientMatrix = BaseMatrix & { api: string; capitalizedName: string; camelizedName: string; + specPath: string; }; type SpecMatrix = BaseMatrix; @@ -66,6 +67,7 @@ async function getClientMatrix({ api: `${clientName}Client`, capitalizedName: clientName, camelizedName: camelize(client), + specPath: client === 'algoliasearch-lite' ? 'search' : client, }); } diff --git a/scripts/release/create-release-issue.ts b/scripts/release/create-release-issue.ts index e3ce1827a2..5f8f07f92d 100755 --- a/scripts/release/create-release-issue.ts +++ b/scripts/release/create-release-issue.ts @@ -2,7 +2,6 @@ import dotenv from 'dotenv'; import semver from 'semver'; -import { getNbGitDiff } from '../ci/utils'; import { LANGUAGES, ROOT_ENV_PATH, @@ -196,25 +195,13 @@ async function createReleaseIssue(): Promise { ); } - if ( - (await getNbGitDiff({ - head: null, - })) !== 0 - ) { - throw new Error( - 'Working directory is not clean. Commit all the changes first.' - ); - } - await run(`git rev-parse --verify refs/tags/${RELEASED_TAG}`, { errorMessage: '`released` tag is missing in this repository.', }); console.log('Pulling from origin...'); - run(`git pull`); - - console.log('Pushing to origin...'); - run(`git push`); + await run('git fetch origin'); + await run('git pull'); const commitsWithUnknownLanguageScope: string[] = []; const commitsWithoutLanguageScope: string[] = []; @@ -295,7 +282,7 @@ async function createReleaseIssue(): Promise { TEXT.approval, ].join('\n\n'); - const octokit = getOctokit(process.env.GITHUB_TOKEN!); + const octokit = getOctokit(process.env.GITHUB_TOKEN); octokit.rest.issues .create({ @@ -312,6 +299,11 @@ async function createReleaseIssue(): Promise { console.log(''); console.log(`Release issue #${number} is ready for review.`); console.log(` > ${url}`); + }) + .catch((error) => { + console.log('Unable to create the release issue'); + + throw new Error(error); }); } From 34c658461a4b673492ca4254b53d8a9dd0990687 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Fri, 29 Apr 2022 17:09:26 +0200 Subject: [PATCH 8/8] all conflicts --- .../packages/algoliasearch-lite/package.json | 8 ++++---- .../algoliasearch-lite/src/algoliasearchLiteClient.ts | 2 +- .../packages/client-abtesting/package.json | 8 ++++---- .../packages/client-abtesting/src/abtestingClient.ts | 2 +- .../packages/client-analytics/package.json | 8 ++++---- .../packages/client-analytics/src/analyticsClient.ts | 2 +- .../packages/client-insights/package.json | 8 ++++---- .../packages/client-insights/src/insightsClient.ts | 2 +- .../packages/client-personalization/package.json | 8 ++++---- .../client-personalization/src/personalizationClient.ts | 2 +- .../packages/client-predict/package.json | 8 ++++---- .../packages/client-predict/src/predictClient.ts | 2 +- .../packages/client-query-suggestions/package.json | 8 ++++---- .../src/querySuggestionsClient.ts | 2 +- .../packages/client-search/package.json | 8 ++++---- .../packages/client-search/src/searchClient.ts | 2 +- .../packages/client-sources/package.json | 8 ++++---- .../packages/client-sources/src/sourcesClient.ts | 2 +- .../packages/recommend/package.json | 8 ++++---- .../packages/recommend/src/recommendClient.ts | 2 +- 20 files changed, 50 insertions(+), 50 deletions(-) diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch-lite/package.json b/clients/algoliasearch-client-javascript/packages/algoliasearch-lite/package.json index 20ba60688d..67928fd8e6 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch-lite/package.json +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch-lite/package.json @@ -1,6 +1,6 @@ { "name": "@experimental-api-clients-automation/algoliasearch-lite", - "version": "0.1.0", + "version": "0.2.0", "description": "JavaScript client for @experimental-api-clients-automation/algoliasearch-lite", "repository": "algolia/algoliasearch-client-javascript", "license": "MIT", @@ -21,9 +21,9 @@ "clean": "rm -rf ./dist" }, "dependencies": { - "@experimental-api-clients-automation/client-common": "0.1.0", - "@experimental-api-clients-automation/requester-browser-xhr": "0.1.0", - "@experimental-api-clients-automation/requester-node-http": "0.1.0" + "@experimental-api-clients-automation/client-common": "0.2.0", + "@experimental-api-clients-automation/requester-browser-xhr": "0.2.0", + "@experimental-api-clients-automation/requester-node-http": "0.2.0" }, "devDependencies": { "@types/node": "16.11.26", diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch-lite/src/algoliasearchLiteClient.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch-lite/src/algoliasearchLiteClient.ts index 28f8da4c7c..7a6da5a4b3 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch-lite/src/algoliasearchLiteClient.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch-lite/src/algoliasearchLiteClient.ts @@ -21,7 +21,7 @@ import type { SearchParams } from '../model/searchParams'; import type { SearchResponse } from '../model/searchResponse'; export * from '../model'; -export const apiClientVersion = '0.1.0'; +export const apiClientVersion = '0.2.0'; function getDefaultHosts(appId: string): Host[] { return ( diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/package.json b/clients/algoliasearch-client-javascript/packages/client-abtesting/package.json index 0040b7703a..fb41d0c308 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/package.json +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/package.json @@ -1,6 +1,6 @@ { "name": "@experimental-api-clients-automation/client-abtesting", - "version": "0.1.0", + "version": "0.2.0", "description": "JavaScript client for @experimental-api-clients-automation/client-abtesting", "repository": "algolia/algoliasearch-client-javascript", "license": "MIT", @@ -21,9 +21,9 @@ "clean": "rm -rf ./dist" }, "dependencies": { - "@experimental-api-clients-automation/client-common": "0.1.0", - "@experimental-api-clients-automation/requester-browser-xhr": "0.1.0", - "@experimental-api-clients-automation/requester-node-http": "0.1.0" + "@experimental-api-clients-automation/client-common": "0.2.0", + "@experimental-api-clients-automation/requester-browser-xhr": "0.2.0", + "@experimental-api-clients-automation/requester-node-http": "0.2.0" }, "devDependencies": { "@types/node": "16.11.26", diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts index 896726dc52..8706acfcdd 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts @@ -18,7 +18,7 @@ import type { AddABTestsRequest } from '../model/addABTestsRequest'; import type { ListABTestsResponse } from '../model/listABTestsResponse'; export * from '../model'; -export const apiClientVersion = '0.1.0'; +export const apiClientVersion = '0.2.0'; export type Region = 'de' | 'us'; diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/package.json b/clients/algoliasearch-client-javascript/packages/client-analytics/package.json index 1755adf51f..b08d5f8122 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/package.json +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@experimental-api-clients-automation/client-analytics", - "version": "0.1.0", + "version": "0.2.0", "description": "JavaScript client for @experimental-api-clients-automation/client-analytics", "repository": "algolia/algoliasearch-client-javascript", "license": "MIT", @@ -21,9 +21,9 @@ "clean": "rm -rf ./dist" }, "dependencies": { - "@experimental-api-clients-automation/client-common": "0.1.0", - "@experimental-api-clients-automation/requester-browser-xhr": "0.1.0", - "@experimental-api-clients-automation/requester-node-http": "0.1.0" + "@experimental-api-clients-automation/client-common": "0.2.0", + "@experimental-api-clients-automation/requester-browser-xhr": "0.2.0", + "@experimental-api-clients-automation/requester-node-http": "0.2.0" }, "devDependencies": { "@types/node": "16.11.26", diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts index 0fa0cb221a..4ca7681fbd 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts @@ -33,7 +33,7 @@ import type { GetUsersCountResponse } from '../model/getUsersCountResponse'; import type { OrderBy } from '../model/orderBy'; export * from '../model'; -export const apiClientVersion = '0.1.0'; +export const apiClientVersion = '0.2.0'; export type Region = 'de' | 'us'; diff --git a/clients/algoliasearch-client-javascript/packages/client-insights/package.json b/clients/algoliasearch-client-javascript/packages/client-insights/package.json index b62fdfeca7..b1c865f555 100644 --- a/clients/algoliasearch-client-javascript/packages/client-insights/package.json +++ b/clients/algoliasearch-client-javascript/packages/client-insights/package.json @@ -1,6 +1,6 @@ { "name": "@experimental-api-clients-automation/client-insights", - "version": "0.1.0", + "version": "0.2.0", "description": "JavaScript client for @experimental-api-clients-automation/client-insights", "repository": "algolia/algoliasearch-client-javascript", "license": "MIT", @@ -21,9 +21,9 @@ "clean": "rm -rf ./dist" }, "dependencies": { - "@experimental-api-clients-automation/client-common": "0.1.0", - "@experimental-api-clients-automation/requester-browser-xhr": "0.1.0", - "@experimental-api-clients-automation/requester-node-http": "0.1.0" + "@experimental-api-clients-automation/client-common": "0.2.0", + "@experimental-api-clients-automation/requester-browser-xhr": "0.2.0", + "@experimental-api-clients-automation/requester-node-http": "0.2.0" }, "devDependencies": { "@types/node": "16.11.26", diff --git a/clients/algoliasearch-client-javascript/packages/client-insights/src/insightsClient.ts b/clients/algoliasearch-client-javascript/packages/client-insights/src/insightsClient.ts index 52d5435a1d..09920f611e 100644 --- a/clients/algoliasearch-client-javascript/packages/client-insights/src/insightsClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-insights/src/insightsClient.ts @@ -16,7 +16,7 @@ import type { InsightEvents } from '../model/insightEvents'; import type { PushEventsResponse } from '../model/pushEventsResponse'; export * from '../model'; -export const apiClientVersion = '0.1.0'; +export const apiClientVersion = '0.2.0'; export type Region = 'de' | 'us'; diff --git a/clients/algoliasearch-client-javascript/packages/client-personalization/package.json b/clients/algoliasearch-client-javascript/packages/client-personalization/package.json index aa02a1712f..8e9285bf55 100644 --- a/clients/algoliasearch-client-javascript/packages/client-personalization/package.json +++ b/clients/algoliasearch-client-javascript/packages/client-personalization/package.json @@ -1,6 +1,6 @@ { "name": "@experimental-api-clients-automation/client-personalization", - "version": "0.1.0", + "version": "0.2.0", "description": "JavaScript client for @experimental-api-clients-automation/client-personalization", "repository": "algolia/algoliasearch-client-javascript", "license": "MIT", @@ -21,9 +21,9 @@ "clean": "rm -rf ./dist" }, "dependencies": { - "@experimental-api-clients-automation/client-common": "0.1.0", - "@experimental-api-clients-automation/requester-browser-xhr": "0.1.0", - "@experimental-api-clients-automation/requester-node-http": "0.1.0" + "@experimental-api-clients-automation/client-common": "0.2.0", + "@experimental-api-clients-automation/requester-browser-xhr": "0.2.0", + "@experimental-api-clients-automation/requester-node-http": "0.2.0" }, "devDependencies": { "@types/node": "16.11.26", diff --git a/clients/algoliasearch-client-javascript/packages/client-personalization/src/personalizationClient.ts b/clients/algoliasearch-client-javascript/packages/client-personalization/src/personalizationClient.ts index 4fc6ea224d..9d956ea3cf 100644 --- a/clients/algoliasearch-client-javascript/packages/client-personalization/src/personalizationClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-personalization/src/personalizationClient.ts @@ -18,7 +18,7 @@ import type { PersonalizationStrategyParams } from '../model/personalizationStra import type { SetPersonalizationStrategyResponse } from '../model/setPersonalizationStrategyResponse'; export * from '../model'; -export const apiClientVersion = '0.1.0'; +export const apiClientVersion = '0.2.0'; export type Region = 'eu' | 'us'; diff --git a/clients/algoliasearch-client-javascript/packages/client-predict/package.json b/clients/algoliasearch-client-javascript/packages/client-predict/package.json index d3ff4c3019..0f58127d8d 100644 --- a/clients/algoliasearch-client-javascript/packages/client-predict/package.json +++ b/clients/algoliasearch-client-javascript/packages/client-predict/package.json @@ -1,6 +1,6 @@ { "name": "@experimental-api-clients-automation/client-predict", - "version": "0.1.0", + "version": "0.2.0", "description": "JavaScript client for @experimental-api-clients-automation/client-predict", "repository": "algolia/algoliasearch-client-javascript", "license": "MIT", @@ -21,9 +21,9 @@ "clean": "rm -rf ./dist" }, "dependencies": { - "@experimental-api-clients-automation/client-common": "0.1.0", - "@experimental-api-clients-automation/requester-browser-xhr": "0.1.0", - "@experimental-api-clients-automation/requester-node-http": "0.1.0" + "@experimental-api-clients-automation/client-common": "0.2.0", + "@experimental-api-clients-automation/requester-browser-xhr": "0.2.0", + "@experimental-api-clients-automation/requester-node-http": "0.2.0" }, "devDependencies": { "@types/node": "16.11.26", diff --git a/clients/algoliasearch-client-javascript/packages/client-predict/src/predictClient.ts b/clients/algoliasearch-client-javascript/packages/client-predict/src/predictClient.ts index f39320c2c2..329dc1598f 100644 --- a/clients/algoliasearch-client-javascript/packages/client-predict/src/predictClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-predict/src/predictClient.ts @@ -16,7 +16,7 @@ import type { FetchUserProfileResponse } from '../model/fetchUserProfileResponse import type { Params } from '../model/params'; export * from '../model'; -export const apiClientVersion = '0.1.0'; +export const apiClientVersion = '0.2.0'; function getDefaultHosts(): Host[] { return [ diff --git a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/package.json b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/package.json index 46cf89d39e..10b3e1d4f0 100644 --- a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/package.json +++ b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/package.json @@ -1,6 +1,6 @@ { "name": "@experimental-api-clients-automation/client-query-suggestions", - "version": "0.1.0", + "version": "0.2.0", "description": "JavaScript client for @experimental-api-clients-automation/client-query-suggestions", "repository": "algolia/algoliasearch-client-javascript", "license": "MIT", @@ -21,9 +21,9 @@ "clean": "rm -rf ./dist" }, "dependencies": { - "@experimental-api-clients-automation/client-common": "0.1.0", - "@experimental-api-clients-automation/requester-browser-xhr": "0.1.0", - "@experimental-api-clients-automation/requester-node-http": "0.1.0" + "@experimental-api-clients-automation/client-common": "0.2.0", + "@experimental-api-clients-automation/requester-browser-xhr": "0.2.0", + "@experimental-api-clients-automation/requester-node-http": "0.2.0" }, "devDependencies": { "@types/node": "16.11.26", diff --git a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts index c32f315078..42b10940b8 100644 --- a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts @@ -20,7 +20,7 @@ import type { Status } from '../model/status'; import type { SucessResponse } from '../model/sucessResponse'; export * from '../model'; -export const apiClientVersion = '0.1.0'; +export const apiClientVersion = '0.2.0'; export type Region = 'eu' | 'us'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/package.json b/clients/algoliasearch-client-javascript/packages/client-search/package.json index f871583726..7b44e823b3 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/package.json +++ b/clients/algoliasearch-client-javascript/packages/client-search/package.json @@ -1,6 +1,6 @@ { "name": "@experimental-api-clients-automation/client-search", - "version": "0.1.0", + "version": "0.2.0", "description": "JavaScript client for @experimental-api-clients-automation/client-search", "repository": "algolia/algoliasearch-client-javascript", "license": "MIT", @@ -21,9 +21,9 @@ "clean": "rm -rf ./dist" }, "dependencies": { - "@experimental-api-clients-automation/client-common": "0.1.0", - "@experimental-api-clients-automation/requester-browser-xhr": "0.1.0", - "@experimental-api-clients-automation/requester-node-http": "0.1.0" + "@experimental-api-clients-automation/client-common": "0.2.0", + "@experimental-api-clients-automation/requester-browser-xhr": "0.2.0", + "@experimental-api-clients-automation/requester-node-http": "0.2.0" }, "devDependencies": { "@types/node": "16.11.26", diff --git a/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts b/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts index d3bc0434fe..ff2ee03f9a 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts @@ -73,7 +73,7 @@ import type { UpdatedRuleResponse } from '../model/updatedRuleResponse'; import type { UserId } from '../model/userId'; export * from '../model'; -export const apiClientVersion = '0.1.0'; +export const apiClientVersion = '0.2.0'; function getDefaultHosts(appId: string): Host[] { return ( diff --git a/clients/algoliasearch-client-javascript/packages/client-sources/package.json b/clients/algoliasearch-client-javascript/packages/client-sources/package.json index 963a914ea6..2249f99cd1 100644 --- a/clients/algoliasearch-client-javascript/packages/client-sources/package.json +++ b/clients/algoliasearch-client-javascript/packages/client-sources/package.json @@ -1,6 +1,6 @@ { "name": "@experimental-api-clients-automation/client-sources", - "version": "0.1.0", + "version": "0.2.0", "description": "JavaScript client for @experimental-api-clients-automation/client-sources", "repository": "algolia/algoliasearch-client-javascript", "license": "MIT", @@ -21,9 +21,9 @@ "clean": "rm -rf ./dist" }, "dependencies": { - "@experimental-api-clients-automation/client-common": "0.1.0", - "@experimental-api-clients-automation/requester-browser-xhr": "0.1.0", - "@experimental-api-clients-automation/requester-node-http": "0.1.0" + "@experimental-api-clients-automation/client-common": "0.2.0", + "@experimental-api-clients-automation/requester-browser-xhr": "0.2.0", + "@experimental-api-clients-automation/requester-node-http": "0.2.0" }, "devDependencies": { "@types/node": "16.11.26", diff --git a/clients/algoliasearch-client-javascript/packages/client-sources/src/sourcesClient.ts b/clients/algoliasearch-client-javascript/packages/client-sources/src/sourcesClient.ts index 4e61d2af83..8365f9798a 100644 --- a/clients/algoliasearch-client-javascript/packages/client-sources/src/sourcesClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-sources/src/sourcesClient.ts @@ -16,7 +16,7 @@ import type { PostIngestUrlResponse } from '../model/postIngestUrlResponse'; import type { PostURLJob } from '../model/postURLJob'; export * from '../model'; -export const apiClientVersion = '0.1.0'; +export const apiClientVersion = '0.2.0'; export type Region = 'de' | 'us'; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/package.json b/clients/algoliasearch-client-javascript/packages/recommend/package.json index 68268918d7..fd75dbb889 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/package.json +++ b/clients/algoliasearch-client-javascript/packages/recommend/package.json @@ -1,6 +1,6 @@ { "name": "@experimental-api-clients-automation/recommend", - "version": "0.1.0", + "version": "0.2.0", "description": "JavaScript client for @experimental-api-clients-automation/recommend", "repository": "algolia/algoliasearch-client-javascript", "license": "MIT", @@ -21,9 +21,9 @@ "clean": "rm -rf ./dist" }, "dependencies": { - "@experimental-api-clients-automation/client-common": "0.1.0", - "@experimental-api-clients-automation/requester-browser-xhr": "0.1.0", - "@experimental-api-clients-automation/requester-node-http": "0.1.0" + "@experimental-api-clients-automation/client-common": "0.2.0", + "@experimental-api-clients-automation/requester-browser-xhr": "0.2.0", + "@experimental-api-clients-automation/requester-node-http": "0.2.0" }, "devDependencies": { "@types/node": "16.11.26", diff --git a/clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts b/clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts index 885855b588..3d14c018e6 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts @@ -17,7 +17,7 @@ import type { GetRecommendationsParams } from '../model/getRecommendationsParams import type { GetRecommendationsResponse } from '../model/getRecommendationsResponse'; export * from '../model'; -export const apiClientVersion = '0.1.0'; +export const apiClientVersion = '0.2.0'; function getDefaultHosts(appId: string): Host[] { return (