All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.touk.nussknacker.engine.graph.fragment.scala Maven / Gradle / Ivy

There is a newer version: 1.18.0
Show newest version
package pl.touk.nussknacker.engine.graph

import io.circe.Decoder
import io.circe.generic.JsonCodec
import pl.touk.nussknacker.engine.graph.evaluatedparam.{Parameter => NodeParameter}

object fragment {

  // we decode absence to empty map because of backwards compatibility (objects in db can contain no `outputVariableNames` field)
  private implicit val mapWithFallbackToEmptyMapDecoder: Decoder[Map[String, String]] =
    Decoder.decodeOption[Map[String, String]](Decoder.decodeMap[String, String]).map(_.getOrElse(Map.empty))

  @JsonCodec case class FragmentRef(
      id: String,
      parameters: List[NodeParameter],
      outputVariableNames: Map[String, String] = Map.empty
  )

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy