json-schema-to-typescript
json-schema-to-typescript copied to clipboard
Compile JSON Schema to TypeScript type declarations
When a schema declared multiple `patternProperties` and no `additionalProperties`, the resulting type definition was effectively 'empty'. This PR produces something that makes a bit more intuitive sense to me for...
Replaces https://github.com/bcherny/json-schema-to-typescript/pull/212
Important note: because of this PR, all snapshots had to be updated, as the tests will attempt to use the project's Prettier config. This mostly just removed the semicolons. closes...
Addresses #200 . Tests seem to do what I expect and the snapshot file generates what I want as well. I'm hopeful this can be merged and released soon, or...
By analogy with #195 Pull Request
The `customName` option takes takes a function that returns the name to assign to schema object and `namePriority` command line option that makes use of this mechanism. Related to #181
Fixes #211
Generated types of referenced schemas are not imported, instead they are output as: ```ts { [k: string]: unknown; } ``` maybe related #471