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
define parent schema with a required property my_property
define child schema that uses extends and references parent schema
use default keyword on my_property in the child schema
Expected behaviour:
Child class inherits my_property from parent and does not re-declare it.
Child class's constructor(s) assign my_property a default value
Actual:
Child class re-declares it's own my_property and sets it to a default value javax.validation detects schema violations because parent.my_property is null
As a workaround I can remove my_property from parent and just make sure to declare them on every child class that has the same parent, but it feels clunky.
The use case here is to have an abstract parent type with concrete types requiring my_property to have a value.
The text was updated successfully, but these errors were encountered:
Steps:
required
propertymy_property
extends
and references parent schemadefault
keyword onmy_property
in the child schemaExpected behaviour:
Child class inherits
my_property
from parent and does not re-declare it.Child class's constructor(s) assign
my_property
a default valueActual:
Child class re-declares it's own
my_property
and sets it to a default valuejavax.validation
detects schema violations because parent.my_property is nullAs a workaround I can remove
my_property
from parent and just make sure to declare them on every child class that has the same parent, but it feels clunky.The use case here is to have an abstract parent type with concrete types requiring
my_property
to have a value.The text was updated successfully, but these errors were encountered: