I checked out the test entry for inherited classes and noted that the mixin is only included with the parent class:
def test_inherited_schema():
@dataclass
class Pet(JsonSchemaMixin):
"""A generic pet"""
name: str
@dataclass
class Cat(Pet):
"""A cat"""
hunting_skill: str
I tested including the mixin in both the parent and child classes (so also including it in Cat above), and it still seems to work correctly - but I'm wondering is that a problem that you should avoid doing, or is that OK?
I checked out the test entry for inherited classes and noted that the mixin is only included with the parent class:
I tested including the mixin in both the parent and child classes (so also including it in Cat above), and it still seems to work correctly - but I'm wondering is that a problem that you should avoid doing, or is that OK?