Skip to content

Commit

Permalink
fix(specs): add secrets payload for updates (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4061

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot and shortcuts committed Oct 31, 2024
1 parent 9e2af27 commit 6b96325
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/scala/algoliasearch/ingestion/AuthInputPartial.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ sealed trait AuthInputPartial

trait AuthInputPartialTrait extends AuthInputPartial

object AuthInputPartial {}
object AuthInputPartial {

case class MapOfStringString(value: Map[String, String]) extends AuthInputPartial

def apply(value: Map[String, String]): AuthInputPartial = {
AuthInputPartial.MapOfStringString(value)
}

}

object AuthInputPartialSerializer extends Serializer[AuthInputPartial] {
override def deserialize(implicit format: Formats): PartialFunction[(TypeInfo, JValue), AuthInputPartial] = {
Expand All @@ -41,6 +49,7 @@ object AuthInputPartialSerializer extends Serializer[AuthInputPartial] {
case value: JObject if value.obj.exists(_._1 == "url") => Extraction.extract[AuthOAuthPartial](value)
case value: JObject => Extraction.extract[AuthAlgoliaPartial](value)
case value: JObject => Extraction.extract[AuthAlgoliaInsightsPartial](value)
case value: JObject => AuthInputPartial.apply(Extraction.extract[Map[String, String]](value))
case _ => throw new MappingException("Can't convert " + json + " to AuthInputPartial")
}
}
Expand Down

0 comments on commit 6b96325

Please sign in to comment.