Open AnkurDedania opened 1 year ago
Thank you for the PR.
I’m not convinced that this is the correct solution to the issue. When constructing a schema for:
@dataclass
class X
y: Union[SomeType, OtherType] = field(metadata=some_metadata)
we need to construct three schema fields: one for SomeType, one for OtherType, and finally one for the Union. In the general case, it seems unreasonable to assume that we want to pass exactly the same custom metadata to all three of those fields.
I've just left a comment on #166 with more on this.
An approach to fix issues described in #166 where metadata configuration needs to be passed