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
#183 added support for enumerations in the algebra. However, generic derivation of schemas only produces oneOf schemas instead of enumerations. We could improve our derivation mechanism to return an enumeration schema for sealed traits having case objects only.
One approach could be to test whether a Coproduct is an enumeration in an implicit rule with a higher priority than the current rule for coproducts (genericTagged):
#183 added support for enumerations in the algebra. However, generic derivation of schemas only produces
oneOf
schemas instead of enumerations. We could improve our derivation mechanism to return an enumeration schema for sealed traits having case objects only.One approach could be to test whether a
Coproduct
is an enumeration in an implicit rule with a higher priority than the current rule for coproducts (genericTagged
):Where
GenericEnum
is defined as follows:And its derivation rule checks that all the elements of the coproduct are singleton objects.
The text was updated successfully, but these errors were encountered: