json-schema-to-typescript icon indicating copy to clipboard operation
json-schema-to-typescript copied to clipboard

Compile JSON Schema to TypeScript type declarations

Results 199 json-schema-to-typescript issues
Sort by recently updated
recently updated
newest added

Currently, the generator defaults to type `{ [k: string]: unknown; }` if JSON Schema type is not a valid type. It would be helpful to have an option to make...

enhancement
help wanted
good first issue

The following schema: ```js "Test": { "type": "object", "properties": { "prop1": { "type": "string" }, "prop2": { "type": "string" }, "prop3": { "type": "string"}, "prop4": { "type": "array", "items": {...

bug
help wanted
good first issue

So we have project with structure like `project/apidocs/entitity` `project/apidocs/response` `project/ts-apidocs/entitity` `project/ts-apidocs/response` if we launch cli tool like `json2ts -i ./apidocs/response/**/*.json -o ts-apidocs` we have a problem `ResolverError: Error opening file...

bug
help wanted
good first issue

Hey, I made this part of my build process to make sure that the interfaces are in sync with the schema (which by the way works great). Unfortunately this takes...

in discussion

This change was found somewhere between 10.1.5 and 11.0.1. When generating types, I am noticing that typedefs are generated twice in certain scenarios, particularly when referencing a schema definition. Schema:...

in discussion

For simplicity's sake, I'd like to be able to declare a type that is a union of strings, not a `const enum`. ```json { "oneOf": [ { "const": "a", "description":...

enhancement
help wanted
good first issue

Perhaps related to #470, but not the same issue. Here, I'm seeing that when a `$ref` pointing to a defined enum has a `description`, the enum gets inlined. ```json {...

If you remove the `title` inside `properties.namedEnum.items` from the `test/e2e/arrayOfEnum.ts`, an error will be thrown: ``` TypeError { message: 'Cannot read property \'endsWith\' of undefined', } > src/generator.ts:182:21 ``` This...

Can you support generics? Like generating from this: ```json { "title": "TGenericNumber", "type": { "$ref": "#/definitions/iarg", "generics": ["number", "string"] }, "definitions": { "iarg": { "title": "IArg", "properties": { "key": {...

enhancement
help wanted