You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JSON schema we use to check the validity of Edition objects is missing types that have been added to the TypeScript schema (e.g., active, uids, chapteruids). This has generally been okay, since we've only been using the TypeScript schema on bookish.press books. But since we developed import.js, this divergence is starting to translate into defects. See in import.js, for example, how we have to define a bunch of fields on the edition that aren't there locally, to make it conform to the platform's expectations.
The clean solution to this is to:
Define two TypeScript schemas, one for local books, and a superset for platform books.
Generate JSON schemas automatically from the TypeScript schemas.
Define a way of converting from local to platform, filling in the missing fields
Use all of these in import.js to check validity more carefully.
The text was updated successfully, but these errors were encountered:
amyjko
added
the
debt
Refactoring opportunities that improve maintainability or modifiability.
label
May 27, 2024
The JSON schema we use to check the validity of
Edition
objects is missing types that have been added to the TypeScript schema (e.g., active, uids, chapteruids). This has generally been okay, since we've only been using the TypeScript schema on bookish.press books. But since we developedimport.js
, this divergence is starting to translate into defects. See inimport.js
, for example, how we have to define a bunch of fields on the edition that aren't there locally, to make it conform to the platform's expectations.The clean solution to this is to:
import.js
to check validity more carefully.The text was updated successfully, but these errors were encountered: