Skip to content

Commit

Permalink
further simplications...
Browse files Browse the repository at this point in the history
  • Loading branch information
jnicoulaud-ledger committed Nov 4, 2023
1 parent 3e53e20 commit 8fa29e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/api/src/main/scala/types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ import sttp.tapir.codec.iron.TapirCodecIron
opaque type Version = Int :| GreaterEqual[0]

object Version extends RefinedTypeOps[Int, GreaterEqual[0], Version] with TapirCodecIron:
given PlainCodec[Version] = summon[PlainCodec[Int]].mapDecode(s => DecodeResult.fromEitherString(s.toString, either(s)))(_.value)
given PlainCodec[Version] = ironTypeCodec

0 comments on commit 8fa29e4

Please sign in to comment.