jsoncanvas icon indicating copy to clipboard operation
jsoncanvas copied to clipboard

generation of schema from typescript

Open Mearman opened this issue 1 year ago • 4 comments

  • based on https://github.com/obsidianmd/jsoncanvas/pull/5
  • [ ] add validation against test document
  • [ ] find viable solution for generating 2020 spec output

Mearman avatar Mar 14 '24 10:03 Mearman

I did some modifications (mostly adding some description + pattern on color string) so you might want to pull in case your MR is merged before mine (if it happens)

chainlist avatar Mar 15 '24 13:03 chainlist

thanks @chainlist. that was why I kept it as a draft

Mearman avatar Mar 15 '24 15:03 Mearman

I really wonder if having the TS type file in this repository is a good thing. JSONSchema doesn't bother me that much because it is part of the specifications for a JSON file.

Would, adding the TS type in https://github.com/DefinitelyTyped/DefinitelyTyped be a bit better ? so doing the following:

npm install @types/jsoncanvas

would work.

Really asking what would be better.

chainlist avatar Mar 15 '24 15:03 chainlist

@chainlist from playing quite large and unwieldy schemas, being able to manipulate it in TypeScript makes things considerably easier, and more accessible to contributors.

Mearman avatar Mar 15 '24 18:03 Mearman