diff --git a/specs/recommend/paths/getRecommendations.yml b/specs/recommend/paths/getRecommendations.yml index 369480b298..f5b721ff73 100644 --- a/specs/recommend/paths/getRecommendations.yml +++ b/specs/recommend/paths/getRecommendations.yml @@ -3,6 +3,7 @@ post: - recommendations operationId: getRecommendations x-use-read-transporter: true + x-cacheable: true summary: Get results. description: Returns recommendations or trending results, for a specific model and `objectID`. requestBody: diff --git a/specs/search/paths/dictionaries/searchDictionaryEntries.yml b/specs/search/paths/dictionaries/searchDictionaryEntries.yml index 85430f5457..853f2e6acc 100644 --- a/specs/search/paths/dictionaries/searchDictionaryEntries.yml +++ b/specs/search/paths/dictionaries/searchDictionaryEntries.yml @@ -3,6 +3,7 @@ post: - Dictionaries operationId: searchDictionaryEntries x-use-read-transporter: true + x-cacheable: true description: Search the dictionary entries. summary: Search a dictionary entries. parameters: diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 022d10a07b..ccd8bffbb2 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -3,6 +3,7 @@ post: - Clusters operationId: searchUserIds x-use-read-transporter: true + x-cacheable: true summary: Search userID. description: > Search for userIDs. diff --git a/specs/search/paths/objects/multipleGetObjects.yml b/specs/search/paths/objects/multipleGetObjects.yml index 3fa819b631..1da0e7e70c 100644 --- a/specs/search/paths/objects/multipleGetObjects.yml +++ b/specs/search/paths/objects/multipleGetObjects.yml @@ -3,6 +3,7 @@ post: - Records operationId: getObjects x-use-read-transporter: true + x-cacheable: true summary: Retrieve one or more objects. description: Retrieve one or more objects, potentially from different indices, in a single API call. requestBody: diff --git a/specs/search/paths/rules/searchRules.yml b/specs/search/paths/rules/searchRules.yml index af8aa35d38..41ea19cac1 100644 --- a/specs/search/paths/rules/searchRules.yml +++ b/specs/search/paths/rules/searchRules.yml @@ -3,6 +3,7 @@ post: - Rules operationId: searchRules x-use-read-transporter: true + x-cacheable: true summary: Search for rules. description: Search for rules matching various criteria. parameters: diff --git a/specs/search/paths/search/search.yml b/specs/search/paths/search/search.yml index c55eb28be6..d3138edbc4 100644 --- a/specs/search/paths/search/search.yml +++ b/specs/search/paths/search/search.yml @@ -3,6 +3,7 @@ post: - Search operationId: search x-use-read-transporter: true + x-cacheable: true summary: Search multiple indices. description: Perform a search operation targeting one or many indices. requestBody: diff --git a/specs/search/paths/search/searchForFacetValues.yml b/specs/search/paths/search/searchForFacetValues.yml index f57a81ec12..ff7aa26ade 100644 --- a/specs/search/paths/search/searchForFacetValues.yml +++ b/specs/search/paths/search/searchForFacetValues.yml @@ -3,6 +3,7 @@ post: - Search operationId: searchForFacetValues x-use-read-transporter: true + x-cacheable: true 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: diff --git a/specs/search/paths/search/searchSingleIndex.yml b/specs/search/paths/search/searchSingleIndex.yml index 6aed18cd11..f4f97f3692 100644 --- a/specs/search/paths/search/searchSingleIndex.yml +++ b/specs/search/paths/search/searchSingleIndex.yml @@ -3,6 +3,7 @@ post: - Search operationId: searchSingleIndex x-use-read-transporter: true + x-cacheable: true summary: Search in a single index. description: Perform a search operation targeting one specific index. parameters: diff --git a/specs/search/paths/synonyms/searchSynonyms.yml b/specs/search/paths/synonyms/searchSynonyms.yml index 199fb9e8a6..ee02ac8fb9 100644 --- a/specs/search/paths/synonyms/searchSynonyms.yml +++ b/specs/search/paths/synonyms/searchSynonyms.yml @@ -3,6 +3,7 @@ post: - Synonyms operationId: searchSynonyms x-use-read-transporter: true + x-cacheable: true summary: Search synonyms. description: Search or browse all synonyms, optionally filtering them by type. parameters: diff --git a/templates/javascript/api-single.mustache b/templates/javascript/api-single.mustache index a807a4fd98..c7588ccfb6 100644 --- a/templates/javascript/api-single.mustache +++ b/templates/javascript/api-single.mustache @@ -221,6 +221,9 @@ export function create{{capitalizedApiName}}(options: CreateClientOptions{{#hasR {{#vendorExtensions.x-use-read-transporter}} useReadTransporter: true, {{/vendorExtensions.x-use-read-transporter}} + {{#vendorExtensions.x-cacheable}} + cacheable: true, + {{/vendorExtensions.x-cacheable}} }; return transporter.request(request, {