File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/main/scala/algoliasearch/ingestion Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,15 @@ sealed trait AuthInputPartial
2727
2828trait AuthInputPartialTrait extends AuthInputPartial
2929
30- object AuthInputPartial {}
30+ object AuthInputPartial {
31+
32+ case class MapOfStringString (value : Map [String , String ]) extends AuthInputPartial
33+
34+ def apply (value : Map [String , String ]): AuthInputPartial = {
35+ AuthInputPartial .MapOfStringString (value)
36+ }
37+
38+ }
3139
3240object AuthInputPartialSerializer extends Serializer [AuthInputPartial ] {
3341 override def deserialize (implicit format : Formats ): PartialFunction [(TypeInfo , JValue ), AuthInputPartial ] = {
@@ -41,6 +49,7 @@ object AuthInputPartialSerializer extends Serializer[AuthInputPartial] {
4149 case value : JObject if value.obj.exists(_._1 == " url" ) => Extraction .extract[AuthOAuthPartial ](value)
4250 case value : JObject => Extraction .extract[AuthAlgoliaPartial ](value)
4351 case value : JObject => Extraction .extract[AuthAlgoliaInsightsPartial ](value)
52+ case value : JObject => AuthInputPartial .apply(Extraction .extract[Map [String , String ]](value))
4453 case _ => throw new MappingException (" Can't convert " + json + " to AuthInputPartial" )
4554 }
4655 }
You can’t perform that action at this time.
0 commit comments