zio / zio-schema

Compositional, type-safe schema definitions, which enable auto-derivation of codecs and migrations.
https://zio.dev/zio-schema
Apache License 2.0
142 stars 162 forks source link

Decode json with field default value works only on all fields have default value #625

Closed liewhite closed 10 months ago

liewhite commented 11 months ago

This works

case class XX(a:Int = 1) derives Schema

But this not work:

case class XX(b:Int , a:Int = 1) derives Schema

It only works when all fields have a default value