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 212 json-schema-to-typescript issues
Sort by recently updated
recently updated
newest added

`{ "anyOf": [] }` is currently converted to `type T = ()` which is invalid TypeScript syntax. This PR fixes the logic so that empty sets and empty arrays become...

The official draft-06 of JSON Schema is out. Given the scope of what's describable in Typescript, I think the changes needed to support it would be fairly minor (just `const`,...

enhancement

I Cannot generate OpenAPI v3.1.0 types from json schema. https://github.com/OAI/OpenAPI-Specification/blob/main/schemas/v3.1/schema.json ```bash > curl https://spec.openapis.org/oas/3.1/schema/2022-10-07 | pnpm json2ts > ./src/openapi/OpenAPIV31.d.ts [ 'Error at key "properties" in file "undefined": deprecated must be...

bug
help wanted

Sometimes, `traverse` accidentally traverses a non-schema object, e.g. instead traversing the `properties` object of a schema. This then causes validation errors if one of these properties is "invalid" (e.g. you...

I write string array schema with description, but it isn't in parsed typescript. please update typescript with description. if you not have time to update, please comment to me for...

# Overview Issue https://github.com/bcherny/json-schema-to-typescript/issues/258 requests a way to deduplicate imports. I’m unsure how others are avoiding this problem today—pointers welcome—but here’s a concrete approach I’ve implemented. This PR adds a...

JSON enums allow enum-values to start with numbers. Interfering the keys from the enum-values will result in an enum like i.e. ``` enum foo { 0bar: "0bar", 1baz: "1baz", }...

## Summary - correct the optimizer description to reference step (7) ## Testing - `npm test` *(fails: shx not found)*

codex

Fixes the `SyntaxError: An identifier or keyword cannot immediately follow a numeric literal.` error, if a enum value starts with a numbre.