format_parser icon indicating copy to clipboard operation
format_parser copied to clipboard

Metadata type validation

Open bermannoah opened this issue 8 years ago • 0 comments

Because we're dealing with the wild and wacky world of file metadata, there might be situations where data comes back in ways we don't expect and probably do not want. (I'm looking at you, PDF headers...) We've tried using dry-validation and dry-struct from the dry-rb gem family, but they have some quirks that outweigh their benefits - namely situations where things that are set to be optional turn out to be strictly enforced.

We could just simply type-check everything that comes through when we save it, or use something like https://github.com/julik/mal, or return very very large structs with lots of nils... or something else entirely.

bermannoah avatar Dec 16 '17 10:12 bermannoah