lib/algolia/models/search/consequence_query.rb in algolia-3.2.2 vs lib/algolia/models/search/consequence_query.rb in algolia-3.2.3

- old
+ new

@@ -79,15 +79,18 @@ end # model else const = Algolia::Search.const_get(klass) if const - # nested oneOf model if const.respond_to?(:openapi_one_of) + # nested oneOf model model = const.build(data) - else + elsif const.respond_to?(:acceptable_attributes) # raise if data contains keys that are not known to the model raise unless (data.keys - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + else + # maybe it's an enum model = const.build_from_hash(data) end return model if model end