Skip to content

Commit 1905b9f

Browse files
fix(specs): remove private beta endpoint from recommend [skip-bc] (generated)
algolia/api-clients-automation#4110 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent ae85461 commit 1905b9f

File tree

3 files changed

+1
-149
lines changed

3 files changed

+1
-149
lines changed

algoliasearch/recommend/models/recommendations_request.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020

2121
from algoliasearch.recommend.models.bought_together_query import BoughtTogetherQuery
2222
from algoliasearch.recommend.models.looking_similar_query import LookingSimilarQuery
23-
from algoliasearch.recommend.models.recommended_for_you_query import (
24-
RecommendedForYouQuery,
25-
)
2623
from algoliasearch.recommend.models.related_query import RelatedQuery
2724
from algoliasearch.recommend.models.trending_facets_query import TrendingFacetsQuery
2825
from algoliasearch.recommend.models.trending_items_query import TrendingItemsQuery
@@ -43,12 +40,9 @@ class RecommendationsRequest(BaseModel):
4340

4441
oneof_schema_5_validator: Optional[LookingSimilarQuery] = Field(default=None)
4542

46-
oneof_schema_6_validator: Optional[RecommendedForYouQuery] = Field(default=None)
47-
4843
actual_instance: Union[
4944
BoughtTogetherQuery,
5045
LookingSimilarQuery,
51-
RecommendedForYouQuery,
5246
RelatedQuery,
5347
TrendingFacetsQuery,
5448
TrendingItemsQuery,
@@ -57,7 +51,6 @@ class RecommendationsRequest(BaseModel):
5751
one_of_schemas: Set[str] = {
5852
"BoughtTogetherQuery",
5953
"LookingSimilarQuery",
60-
"RecommendedForYouQuery",
6154
"RelatedQuery",
6255
"TrendingFacetsQuery",
6356
"TrendingItemsQuery",
@@ -83,7 +76,6 @@ def unwrap_actual_instance(
8376
) -> Union[
8477
BoughtTogetherQuery,
8578
LookingSimilarQuery,
86-
RecommendedForYouQuery,
8779
RelatedQuery,
8880
TrendingFacetsQuery,
8981
TrendingItemsQuery,
@@ -133,18 +125,12 @@ def from_json(cls, json_str: str) -> Self:
133125
try:
134126
instance.actual_instance = LookingSimilarQuery.from_json(json_str)
135127

136-
return instance
137-
except (ValidationError, ValueError) as e:
138-
error_messages.append(str(e))
139-
try:
140-
instance.actual_instance = RecommendedForYouQuery.from_json(json_str)
141-
142128
return instance
143129
except (ValidationError, ValueError) as e:
144130
error_messages.append(str(e))
145131

146132
raise ValueError(
147-
"No match found when deserializing the JSON string into RecommendationsRequest with oneOf schemas: BoughtTogetherQuery, LookingSimilarQuery, RecommendedForYouQuery, RelatedQuery, TrendingFacetsQuery, TrendingItemsQuery. Details: "
133+
"No match found when deserializing the JSON string into RecommendationsRequest with oneOf schemas: BoughtTogetherQuery, LookingSimilarQuery, RelatedQuery, TrendingFacetsQuery, TrendingItemsQuery. Details: "
148134
+ ", ".join(error_messages)
149135
)
150136

@@ -167,7 +153,6 @@ def to_dict(
167153
Dict[str, Any],
168154
BoughtTogetherQuery,
169155
LookingSimilarQuery,
170-
RecommendedForYouQuery,
171156
RelatedQuery,
172157
TrendingFacetsQuery,
173158
TrendingItemsQuery,

algoliasearch/recommend/models/recommended_for_you_model.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

algoliasearch/recommend/models/recommended_for_you_query.py

Lines changed: 0 additions & 101 deletions
This file was deleted.

0 commit comments

Comments
 (0)