Skip to content

Commit

Permalink
fix(ruby): use discriminators for oneOf [skip-bc] (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4310

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
  • Loading branch information
algolia-bot and millotp committed Jan 6, 2025
1 parent 68b98ea commit 2254daf
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ object RecommendationsHitSerializer extends Serializer[RecommendationsHit] {
json match {
case value: JObject if value.obj.exists(_._1 == "facetName") && value.obj.exists(_._1 == "facetValue") =>
Extraction.extract[TrendingFacetHit](value)
case value: JObject if value.obj.exists(_._1 == "objectID") => Extraction.extract[RecommendHit](value)
case _ => throw new MappingException("Can't convert " + json + " to RecommendationsHit")
}
}
Expand Down

0 comments on commit 2254daf

Please sign in to comment.