News for hackers. Stuff that matters.
Re:JSON Schema bundling formalised by diegoperini on Friday September 10, 2021 @07:12AM (#28479924)
I haven't stumbled upon a better schema for JSON than the Typescript definition files. If only I could use them in non Typescript contexts.

https://www.typescriptlang.org/docs/handbook/declaration-fil...

Re:JSON Schema bundling formalised by YousefED on Friday September 10, 2021 @07:18AM (#28479958)
This is why I originally started a project to convert ts to json schema; https://github.com/YousefED/typescript-json-schema (and also check out a good alternative https://github.com/vega/ts-json-schema-generator)
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

Re:JSON Schema bundling formalised by IggleSniggle on Friday September 10, 2021 @08:38AM (#28480659)
If you like zod, you should check out myzod: https://github.com/davidmdm/myzod
Re:JSON Schema bundling formalised by anentropic on Friday September 10, 2021 @07:19AM (#28479961)
you might like https://jsontypedef.com/ if you haven't seen it