From 9776cb3ba61d904586b82051a7647bd88ce5dd43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Vannicatte?= Date: Mon, 1 Jul 2024 16:02:47 +0200 Subject: [PATCH] feat(specs): add redirect to renderingContent (#3296) --- .../com/algolia/codegen/AlgoliaSwiftGenerator.java | 1 + specs/common/schemas/IndexSettings.yml | 10 ++++++++++ specs/search/common/schemas/SearchResponse.yml | 2 +- .../clients/algoliasearch/builds/models.mustache | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java index c357ac098c..f5d682ca84 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java @@ -84,6 +84,7 @@ public class AlgoliaSwiftGenerator extends Swift5ClientCodegen { "redirect", "redirectruleindexmetadata", "redirectruleindexmetadatadata", + "redirecturl", "region", "removestopwords", "removewordsifnoresults", diff --git a/specs/common/schemas/IndexSettings.yml b/specs/common/schemas/IndexSettings.yml index 1744ec72d0..a95f3b37ee 100644 --- a/specs/common/schemas/IndexSettings.yml +++ b/specs/common/schemas/IndexSettings.yml @@ -995,9 +995,19 @@ renderingContent: properties: facetOrdering: $ref: '#/facetOrdering' + redirect: + $ref: '#/redirectURL' x-categories: - Advanced +redirectURL: + description: The redirect rule container. + type: object + additionalProperties: false + properties: + url: + type: string + facetOrdering: description: Order of facet names and facet values in your UI. type: object diff --git a/specs/search/common/schemas/SearchResponse.yml b/specs/search/common/schemas/SearchResponse.yml index 376d84ba40..3b004e9065 100644 --- a/specs/search/common/schemas/SearchResponse.yml +++ b/specs/search/common/schemas/SearchResponse.yml @@ -166,7 +166,7 @@ baseSearchResponse: title: redirect type: object description: | - [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/). + [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only. properties: index: type: array diff --git a/templates/javascript/clients/algoliasearch/builds/models.mustache b/templates/javascript/clients/algoliasearch/builds/models.mustache index 36b601c15c..64ac7c5ffc 100644 --- a/templates/javascript/clients/algoliasearch/builds/models.mustache +++ b/templates/javascript/clients/algoliasearch/builds/models.mustache @@ -59,6 +59,7 @@ import { Redirect, RedirectRuleIndexMetadata, RedirectRuleIndexMetadataData, + RedirectURL, RemoveStopWords, RemoveWordsIfNoResults, RenderingContent, @@ -143,6 +144,7 @@ export { Redirect, RedirectRuleIndexMetadata, RedirectRuleIndexMetadataData, + RedirectURL, RemoveStopWords, RemoveWordsIfNoResults, RenderingContent,