bookish
bookish copied to clipboard
Verify schema compliance on books collection read/write
While TypeScript prevents a lot of issues with schema compliance, there are a number of ways that malformed book/edition metadata might sneak into the database:
- Schema changes that aren't correctly propagated to production data
- Future functionality that imports books
We use AJV
to do schema validation when compiling books; we should do the same each time we read a book for display and before we write a book for display.