You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment it is not possible to use Union Types in Tapir
The following Code does not work:
case class In(
subStatusKey: SubStatusKeyDocuments | SubStatusKeyGeneral = SubStatusKeyDocuments.`documents-prepared`,
)
object In:
given Schema[In] = Schema.derived
given CirceCodec[In] = deriveCodec
end In
enum SubStatusKeyGeneral derives ConfiguredEnumCodec:
case canceled
case finished
object SubStatusKeyGeneral:
given Schema[SubStatusKeyGeneral] = Schema.derivedEnumeration[T].defaultStringBased
end SubStatusKeyGeneral
...
Expectations
If there are Schemas for all of the Union Types, this should work out of the box, otherwise throw an exception which of the types are missing the Schema.
The output should look be 'oneOf' the types.
The text was updated successfully, but these errors were encountered:
At the moment it is not possible to use Union Types in Tapir
The following Code does not work:
Expectations
The text was updated successfully, but these errors were encountered: