Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata type validation #19

Open
bermannoah opened this issue Dec 16, 2017 · 0 comments
Open

Metadata type validation #19

bermannoah opened this issue Dec 16, 2017 · 0 comments

Comments

@bermannoah
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant