From 5ac988945c04455dbf25c3e9a84fd63601dced0d Mon Sep 17 00:00:00 2001 From: schetvertkov Date: Mon, 17 Jun 2024 18:34:27 +0300 Subject: [PATCH] Fixes #691 - when decoding json payload using decoder derived from a schema, the missing fields in are populated using their default values (for case classes with more than 22 fields) --- .../zio/schema/codec/JsonCodecSpec.scala | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/zio-schema-json/shared/src/test/scala-2/zio/schema/codec/JsonCodecSpec.scala b/zio-schema-json/shared/src/test/scala-2/zio/schema/codec/JsonCodecSpec.scala index ff1611bf6..2a0db54ed 100644 --- a/zio-schema-json/shared/src/test/scala-2/zio/schema/codec/JsonCodecSpec.scala +++ b/zio-schema-json/shared/src/test/scala-2/zio/schema/codec/JsonCodecSpec.scala @@ -1881,30 +1881,30 @@ object JsonCodecSpec extends ZIOSpecDefault { } case class RecordExample( - f1: Option[String], - f2: Option[String], - f3: Option[String] = None, - f4: Option[String] = None, - f5: Option[String] = None, - f6: Option[String] = None, - f7: Option[String] = None, - f8: Option[String] = None, - f9: Option[String] = None, - f10: Option[String] = None, - f11: Option[String] = None, - f12: Option[String] = None, - f13: Option[String] = None, - f14: Option[String] = None, - f15: Option[String] = None, - f16: Option[String] = None, - f17: Option[String] = None, - f18: Option[String] = None, - f19: Option[String] = None, - f20: Option[String] = None, - f21: Option[String] = None, - f22: Option[String] = None, - f23: Option[String] = None - ) + f1: Option[String], + f2: Option[String], + f3: Option[String] = None, + f4: Option[String] = None, + f5: Option[String] = None, + f6: Option[String] = None, + f7: Option[String] = None, + f8: Option[String] = None, + f9: Option[String] = None, + f10: Option[String] = None, + f11: Option[String] = None, + f12: Option[String] = None, + f13: Option[String] = None, + f14: Option[String] = None, + f15: Option[String] = None, + f16: Option[String] = None, + f17: Option[String] = None, + f18: Option[String] = None, + f19: Option[String] = None, + f20: Option[String] = None, + f21: Option[String] = None, + f22: Option[String] = None, + f23: Option[String] = None + ) object RecordExample { implicit lazy val schema: Schema[RecordExample] = DeriveSchema.gen[RecordExample]