Re:JSON Schema bundling formalised
by panzerklein on Friday September 10, 2021 @07:27AM
(#28480021)
You can write validation schemas using zod library [1]. They end up looking pretty similar to typescript definitions (same vocabulary, same methods for combining/intersecting/filtering). And if you migrate to typescript you'll get type definitions for free out of those schemas.
[1] https://github.com/colinhacks/zod