Open lynnagara opened 1 year ago
I think the way to achieve this is to implement a kind of schema preprocessor that combines multiple schemas into one. Now schemas have a compilation step.
A lot of tooling directly reads the JSON files, and that'll have to be changed. off the top of my head, json-schema-diff lint, type generator(s) and the actual published packages themselves use different methods each to load those files.
Probably at least a week's worth of work.
When defining the
transactions
schema, I noticed there was a lot of copy/paste fromevents
. The reason for this is that the bulk of the schema definition related to thecontexts
object, which is fairly complex and also entirely the same in the two schemas.It would be great if we can define these subschemas in one place and resolve them from multiple other schemas.