From 8fa29e4d46157e183952ec894dbaf7be5755bbe8 Mon Sep 17 00:00:00 2001 From: Julien Nicoulaud Date: Sat, 4 Nov 2023 11:47:57 +0100 Subject: [PATCH] further simplications... --- modules/api/src/main/scala/types.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/api/src/main/scala/types.scala b/modules/api/src/main/scala/types.scala index 2365886..5b5207b 100644 --- a/modules/api/src/main/scala/types.scala +++ b/modules/api/src/main/scala/types.scala @@ -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