Open mvandenburgh opened 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.74%. Comparing base (
e135307
) to head (a23a0a9
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
There's some test failures happening here that I have to look into, marking this as draft for now.
The changes look good to me.
The JSON schemas have changed though mostly because of the inclusion of the discriminator object as mentioned in the discriminated union docs. We may need to increase the JSON schema version, but I don't expect much perceivable difference for the end users.
@yarikoptic @satra Should me up the JSON schema version for this one? We didn't up the JSON schema version for https://github.com/dandi/dandi-schema/pull/236, so the changes in JSON schemas from that PR are yet to be included in the latest published schemas.
my personal take is that for any change upon release we should up the json version, otherwise it all becomes ambiguous and possibly hard to troubleshoot later on. "explicit better than implicit"!
Fixes #244
This change allows Pydantic to generate more useful validation errors by making use of discriminated unions where possible.