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

Not able to use the library in it's current state when using yarn 3: ``` ➤ YN0018: │ @apidevtools/json-schema-ref-parser@https://github.com/bcherny/json-schema-ref-parser.git#commit=984282d34a2993e5243aa35100fe32a63699164d: The remote archive doesn't match the local checksum - has the...

bug
help wanted

Linked issue: https://github.com/bcherny/json-schema-to-typescript/issues/200 Addressed comments/requests in: https://github.com/bcherny/json-schema-to-typescript/pull/262#pullrequestreview-324907958 Implemented as a normalizer under cli/options flag: `inferStringEnumKeysFromValues`

hello ... i found an issue eslint-types/eslint-define-config that i think comes from the transformation of the jsonschema to typescript this schema: https://github.com/eslint/eslint/blob/b91f9dc072f17f5ea79803deb86cf002d031b4cf/lib/rules/camelcase.js#L30 is transformed to ```ts { ignoreDestructuring?: boolean ignoreImports?:...

When generating code using `unreachableDefinitions` it adds a comment to the interface stating `This interface was referenced by...`. I find this quite annoying. So I added an option to not...

(on windows) looks like it adds the process path to the CWD option. worked fine in 11.0.3 with 12.0 I got: ``` ResolverError: Error opening file "E:\myproject\node_modules\@bcherny\json-schema-ref-parser\E:\myproject\src\api\v2\schema\index.schema" [...] at ReadFileContext.callback...

bug
help wanted

Given structure like so: `schema/my-stuff.json :` ``` { "id": "Stuff", "type": "object", "properties": { "someProp": { "$ref": "schema/enums/awesome-enum.json" } } } ``` `schema/enums/awesome.json :` ``` { "id": "Awesome", "type": "string",...

Happen to notice, JSTT fail to compile duplicate `enum`. ![image](https://github.com/bcherny/json-schema-to-typescript/assets/52395980/ea614bea-1f03-45e8-8ff7-04dd75b51d95) However,it works fine when the `enum` property is direct property of an `object` ![image](https://github.com/bcherny/json-schema-to-typescript/assets/52395980/cf840a80-8d46-4047-87fa-12884121dd68) > example data ```json { "type":...

If one writes their schemas in `yaml` file format, is there a simple way to generate types using the CLI tool? If not - could a support for that be...

enhancement
help wanted
good first issue

### Added optional `--usePrefixItems` flag that defaults to false. When passed JSON schemas containing `prefixItems` and `items` keys are normalized as `items` and `additionalItems`, as per JSON Schema [Draft 2020-12](https://json-schema.org/draft/2020-12/release-notes)....

By default, this library hoists the "title" filed of a property as the name of the property type. For example, the following schema: ``` export const input = { title:...