From 57d3aba1c2fb18ff8056733fd619bfb80598f1b8 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Mon, 28 Oct 2024 12:55:16 +0000 Subject: [PATCH] fix(specs): support synonyms type in camel case [skip-bc] (generated) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/algolia/api-clients-automation/pull/4031 Co-authored-by: algolia-bot Co-authored-by: Clément Vannicatte --- algoliasearch/ingestion/models/big_query_data_type.py | 4 ++-- .../ingestion/models/mapping_format_schema.py | 2 +- algoliasearch/recommend/models/fbt_model.py | 2 +- .../recommend/models/looking_similar_model.py | 2 +- algoliasearch/recommend/models/recommend_models.py | 8 ++++---- .../recommend/models/recommended_for_you_model.py | 2 +- algoliasearch/recommend/models/related_model.py | 2 +- algoliasearch/recommend/models/supported_language.py | 2 +- .../recommend/models/trending_facets_model.py | 2 +- algoliasearch/recommend/models/trending_items_model.py | 2 +- algoliasearch/search/models/supported_language.py | 2 +- algoliasearch/search/models/synonym_type.py | 10 ++++++++-- 12 files changed, 23 insertions(+), 17 deletions(-) diff --git a/algoliasearch/ingestion/models/big_query_data_type.py b/algoliasearch/ingestion/models/big_query_data_type.py index d13143960..303cbe918 100644 --- a/algoliasearch/ingestion/models/big_query_data_type.py +++ b/algoliasearch/ingestion/models/big_query_data_type.py @@ -24,9 +24,9 @@ class BigQueryDataType(str, Enum): """ allowed enum values """ - GA4 = "ga4" + GA_4 = "ga4" - GA360 = "ga360" + GA_360 = "ga360" @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/algoliasearch/ingestion/models/mapping_format_schema.py b/algoliasearch/ingestion/models/mapping_format_schema.py index 6a444bb67..db39c8f61 100644 --- a/algoliasearch/ingestion/models/mapping_format_schema.py +++ b/algoliasearch/ingestion/models/mapping_format_schema.py @@ -24,7 +24,7 @@ class MappingFormatSchema(str, Enum): """ allowed enum values """ - MAPPINGKIT_SLASH_V1 = "mappingkit/v1" + MAPPINGKIT_V_1 = "mappingkit/v1" @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/algoliasearch/recommend/models/fbt_model.py b/algoliasearch/recommend/models/fbt_model.py index 30108a06f..11be73945 100644 --- a/algoliasearch/recommend/models/fbt_model.py +++ b/algoliasearch/recommend/models/fbt_model.py @@ -24,7 +24,7 @@ class FbtModel(str, Enum): """ allowed enum values """ - BOUGHT_MINUS_TOGETHER = "bought-together" + BOUGHT_TOGETHER = "bought-together" @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/algoliasearch/recommend/models/looking_similar_model.py b/algoliasearch/recommend/models/looking_similar_model.py index 49bb365fa..afa2559a5 100644 --- a/algoliasearch/recommend/models/looking_similar_model.py +++ b/algoliasearch/recommend/models/looking_similar_model.py @@ -24,7 +24,7 @@ class LookingSimilarModel(str, Enum): """ allowed enum values """ - LOOKING_MINUS_SIMILAR = "looking-similar" + LOOKING_SIMILAR = "looking-similar" @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/algoliasearch/recommend/models/recommend_models.py b/algoliasearch/recommend/models/recommend_models.py index fca839f9e..aa189d2cb 100644 --- a/algoliasearch/recommend/models/recommend_models.py +++ b/algoliasearch/recommend/models/recommend_models.py @@ -24,13 +24,13 @@ class RecommendModels(str, Enum): """ allowed enum values """ - RELATED_MINUS_PRODUCTS = "related-products" + RELATED_PRODUCTS = "related-products" - BOUGHT_MINUS_TOGETHER = "bought-together" + BOUGHT_TOGETHER = "bought-together" - TRENDING_MINUS_FACETS = "trending-facets" + TRENDING_FACETS = "trending-facets" - TRENDING_MINUS_ITEMS = "trending-items" + TRENDING_ITEMS = "trending-items" @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/algoliasearch/recommend/models/recommended_for_you_model.py b/algoliasearch/recommend/models/recommended_for_you_model.py index 63ead0cec..51d52fb1e 100644 --- a/algoliasearch/recommend/models/recommended_for_you_model.py +++ b/algoliasearch/recommend/models/recommended_for_you_model.py @@ -24,7 +24,7 @@ class RecommendedForYouModel(str, Enum): """ allowed enum values """ - RECOMMENDED_MINUS_FOR_MINUS_YOU = "recommended-for-you" + RECOMMENDED_FOR_YOU = "recommended-for-you" @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/algoliasearch/recommend/models/related_model.py b/algoliasearch/recommend/models/related_model.py index 17d81993b..3ef9c0b67 100644 --- a/algoliasearch/recommend/models/related_model.py +++ b/algoliasearch/recommend/models/related_model.py @@ -24,7 +24,7 @@ class RelatedModel(str, Enum): """ allowed enum values """ - RELATED_MINUS_PRODUCTS = "related-products" + RELATED_PRODUCTS = "related-products" @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/algoliasearch/recommend/models/supported_language.py b/algoliasearch/recommend/models/supported_language.py index bbac80c88..9488fe62f 100644 --- a/algoliasearch/recommend/models/supported_language.py +++ b/algoliasearch/recommend/models/supported_language.py @@ -122,7 +122,7 @@ class SupportedLanguage(str, Enum): PT = "pt" - PT_MINUS_BR = "pt-br" + PT_BR = "pt-br" QU = "qu" diff --git a/algoliasearch/recommend/models/trending_facets_model.py b/algoliasearch/recommend/models/trending_facets_model.py index 156c04de4..a5dcba3eb 100644 --- a/algoliasearch/recommend/models/trending_facets_model.py +++ b/algoliasearch/recommend/models/trending_facets_model.py @@ -24,7 +24,7 @@ class TrendingFacetsModel(str, Enum): """ allowed enum values """ - TRENDING_MINUS_FACETS = "trending-facets" + TRENDING_FACETS = "trending-facets" @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/algoliasearch/recommend/models/trending_items_model.py b/algoliasearch/recommend/models/trending_items_model.py index 5fd103e9a..f99ce92f7 100644 --- a/algoliasearch/recommend/models/trending_items_model.py +++ b/algoliasearch/recommend/models/trending_items_model.py @@ -24,7 +24,7 @@ class TrendingItemsModel(str, Enum): """ allowed enum values """ - TRENDING_MINUS_ITEMS = "trending-items" + TRENDING_ITEMS = "trending-items" @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/algoliasearch/search/models/supported_language.py b/algoliasearch/search/models/supported_language.py index bbac80c88..9488fe62f 100644 --- a/algoliasearch/search/models/supported_language.py +++ b/algoliasearch/search/models/supported_language.py @@ -122,7 +122,7 @@ class SupportedLanguage(str, Enum): PT = "pt" - PT_MINUS_BR = "pt-br" + PT_BR = "pt-br" QU = "qu" diff --git a/algoliasearch/search/models/synonym_type.py b/algoliasearch/search/models/synonym_type.py index babd3e069..e2d69e327 100644 --- a/algoliasearch/search/models/synonym_type.py +++ b/algoliasearch/search/models/synonym_type.py @@ -28,12 +28,18 @@ class SynonymType(str, Enum): ONEWAYSYNONYM = "onewaysynonym" - ALTCORRECTION1 = "altcorrection1" + ALTCORRECTION_1 = "altcorrection1" - ALTCORRECTION2 = "altcorrection2" + ALTCORRECTION_2 = "altcorrection2" PLACEHOLDER = "placeholder" + ONE_WAY_SYNONYM = "oneWaySynonym" + + ALTCORRECTION1 = "altCorrection1" + + ALTCORRECTION2 = "altCorrection2" + @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SynonymType from a JSON string"""