Skip to content

Commit

Permalink
fix(specs): remove private beta endpoint from recommend [skip-bc] (ge…
Browse files Browse the repository at this point in the history
…nerated)

algolia/api-clients-automation#4110

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
  • Loading branch information
algolia-bot and shortcuts committed Nov 15, 2024
1 parent ae85461 commit 1905b9f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 149 deletions.
17 changes: 1 addition & 16 deletions algoliasearch/recommend/models/recommendations_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

from algoliasearch.recommend.models.bought_together_query import BoughtTogetherQuery
from algoliasearch.recommend.models.looking_similar_query import LookingSimilarQuery
from algoliasearch.recommend.models.recommended_for_you_query import (
RecommendedForYouQuery,
)
from algoliasearch.recommend.models.related_query import RelatedQuery
from algoliasearch.recommend.models.trending_facets_query import TrendingFacetsQuery
from algoliasearch.recommend.models.trending_items_query import TrendingItemsQuery
Expand All @@ -43,12 +40,9 @@ class RecommendationsRequest(BaseModel):

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

oneof_schema_6_validator: Optional[RecommendedForYouQuery] = Field(default=None)

actual_instance: Union[
BoughtTogetherQuery,
LookingSimilarQuery,
RecommendedForYouQuery,
RelatedQuery,
TrendingFacetsQuery,
TrendingItemsQuery,
Expand All @@ -57,7 +51,6 @@ class RecommendationsRequest(BaseModel):
one_of_schemas: Set[str] = {
"BoughtTogetherQuery",
"LookingSimilarQuery",
"RecommendedForYouQuery",
"RelatedQuery",
"TrendingFacetsQuery",
"TrendingItemsQuery",
Expand All @@ -83,7 +76,6 @@ def unwrap_actual_instance(
) -> Union[
BoughtTogetherQuery,
LookingSimilarQuery,
RecommendedForYouQuery,
RelatedQuery,
TrendingFacetsQuery,
TrendingItemsQuery,
Expand Down Expand Up @@ -133,18 +125,12 @@ def from_json(cls, json_str: str) -> Self:
try:
instance.actual_instance = LookingSimilarQuery.from_json(json_str)

return instance
except (ValidationError, ValueError) as e:
error_messages.append(str(e))
try:
instance.actual_instance = RecommendedForYouQuery.from_json(json_str)

return instance
except (ValidationError, ValueError) as e:
error_messages.append(str(e))

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

Expand All @@ -167,7 +153,6 @@ def to_dict(
Dict[str, Any],
BoughtTogetherQuery,
LookingSimilarQuery,
RecommendedForYouQuery,
RelatedQuery,
TrendingFacetsQuery,
TrendingItemsQuery,
Expand Down
32 changes: 0 additions & 32 deletions algoliasearch/recommend/models/recommended_for_you_model.py

This file was deleted.

101 changes: 0 additions & 101 deletions algoliasearch/recommend/models/recommended_for_you_query.py

This file was deleted.

0 comments on commit 1905b9f

Please sign in to comment.