s-knibbs / dataclasses-jsonschema

JSON schema generation from dataclasses
MIT License
166 stars 38 forks source link

Add check that literal values are valid to decode_field #164

Open roshcagra opened 3 years ago

roshcagra commented 3 years ago

Adds an explicit check that a literal field has a valid value when decoding. This will improve decoding when types in a Union have overlapping fields but may be discriminated by a literal.

roshcagra commented 3 years ago

Fix for https://github.com/s-knibbs/dataclasses-jsonschema/issues/163

roshcagra commented 3 years ago

@s-knibbs Looks like I can't add you as an assignee, but hope this looks good!

s-knibbs commented 2 years ago

Fixes #163

roshcagra commented 2 years ago

@s-knibbs updated re: your feedback