Skip to content

Commit

Permalink
no idea why I was deriving a circe codec for that enum, doesn't make …
Browse files Browse the repository at this point in the history
…sense. Removed
  • Loading branch information
hughsimpson committed Aug 2, 2024
1 parent d225fac commit 2fd4219
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ object EnumGenerator {
val maybeCodecExtensions = jsonSerdeLib match {
case _ if !jsonParamRefs.contains(name) && !queryParamRefs.contains(name) => ""
case _ if !jsonParamRefs.contains(name) => " derives enumextensions.EnumMirror"
case JsonSerdeLib.Circe | JsonSerdeLib.Jsoniter if !queryParamRefs.contains(name) =>
" derives org.latestbit.circe.adt.codec.JsonTaggedAdt.PureCodec"
case JsonSerdeLib.Circe | JsonSerdeLib.Jsoniter =>
" derives org.latestbit.circe.adt.codec.JsonTaggedAdt.PureCodec, enumextensions.EnumMirror"
case JsonSerdeLib.Circe if !queryParamRefs.contains(name) => " derives org.latestbit.circe.adt.codec.JsonTaggedAdt.PureCodec"
case JsonSerdeLib.Circe => " derives org.latestbit.circe.adt.codec.JsonTaggedAdt.PureCodec, enumextensions.EnumMirror"
case JsonSerdeLib.Jsoniter if !queryParamRefs.contains(name) => ""
case JsonSerdeLib.Jsoniter => " derives enumextensions.EnumMirror"
case JsonSerdeLib.Zio if !queryParamRefs.contains(name) => s" extends java.lang.Enum[$name]"
case JsonSerdeLib.Zio => s" extends java.lang.Enum[$name] derives enumextensions.EnumMirror"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ object TapirGeneratedEndpoints {
a: Option[Seq[String]] = None
) extends ADTWithDiscriminator with ADTWithDiscriminatorNoMapping

enum AnEnum derives org.latestbit.circe.adt.codec.JsonTaggedAdt.PureCodec {
enum AnEnum {
case Foo, Bar, Baz
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ libraryDependencies ++= Seq(
"com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % "1.10.0",
"com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % "0.8.0",
"com.beachape" %% "enumeratum" % "1.7.4",
"org.latestbit" %% "circe-tagged-adt-codec" % "0.11.0",
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-core" % "2.30.7",
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % "2.30.7" % "compile-internal",
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
Expand Down

0 comments on commit 2fd4219

Please sign in to comment.