Skip to content

Commit

Permalink
fix(specs): ingestion destination reject indexPrefix (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3478

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 Aug 5, 2024
1 parent 4f6efb7 commit fd44bd2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 36 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,14 @@ object DestinationInputSerializer extends Serializer[DestinationInput] {

case (TypeInfo(clazz, _), json) if clazz == classOf[DestinationInput] =>
json match {
case value: JObject => Extraction.extract[DestinationIndexPrefix](value)
case value: JObject => Extraction.extract[DestinationIndexName](value)
case _ => throw new MappingException("Can't convert " + json + " to DestinationInput")
}
}

override def serialize(implicit format: Formats): PartialFunction[Any, JValue] = { case value: DestinationInput =>
value match {
case value: DestinationIndexPrefix => Extraction.decompose(value)(format - this)
case value: DestinationIndexName => Extraction.decompose(value)(format - this)
case value: DestinationIndexName => Extraction.decompose(value)(format - this)
}
}
}

0 comments on commit fd44bd2

Please sign in to comment.