bookish icon indicating copy to clipboard operation
bookish copied to clipboard

Verify schema compliance on books collection read/write

Open amyjko opened this issue 2 years ago • 0 comments

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.

amyjko avatar Feb 18 '23 16:02 amyjko