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

If I use the following schema ```json { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "Condition", "properties": { "conditions": { "type": "object", "additionalProperties": { "type": "object", "items": { "oneOf": [ { "$ref":...

bug
help wanted
good first issue

I am not sure whether this is a configuration problem, expected behaviour or a bug but... I declare a json schema file _id.schema.json_ containing: ```json { "title": "TId", "type": "string"...

bug
help wanted

I am using the following JSON Schema: ```json { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Demo", "type": "object", "additionalProperties": false, "properties": { "hostname": { "type": "string" }, "enable_subconfig": { "type": "boolean" } },...

in discussion

To reproduce this problem, download the attached file: [example.zip](https://github.com/bcherny/json-schema-to-typescript/files/5957774/example.zip) Then execute the following commands ``` unzip ./example.zip json2ts -i test/resources/multi-example/**/*.json --cwd test/resources/multi-example/schemas/ cat test/resources/multi-example/schemas/personForm.json ``` File "personForm.json" is overwritten. Source...

bug
help wanted
good first issue

I'm seeing an issue where the formatting doesn't follow the standard Prettier rules, in this instance regarding line length. I have an enum that looks something like this, as part...

bug
help wanted
good first issue

Currently the types are using `JSONSchema4` as the type for `schema`, which means TypeScript won't let you pass objects of type `JSONSchema7` due to type differences. Specifically, `exclusiveMaximum` & `exclusiveMinimum`...

enhancement
help wanted
in discussion

I tried to convert the [json schema defintion for openapi]( https://github.com/OAI/OpenAPI-Specification/tree/master/schemas/v3.0) to a `schema.t.ts`. At first it looked succesful, but there are several details which are omitted from the final...

bug
help wanted

`propertyNames` is included in the "not expressible in TS" list, but at least for the case with `enum` instead of `pattern`, this is not true. Consider the following example: ````...

enhancement
help wanted

Hello @bcherny, I have a single big JSON [schema file](https://www.hl7.org/fhir/fhir.schema.json.zip) including about 150 definitions. Is that possible to split the definition of each class into their own .d.ts file? It...

For a schema "MyType", I would like this tool to generate the following TypeScript code. ```ts import Ajv from "ajv"; const ajv = new Ajv(); const MyTypeSchema = {...}; //...

enhancement
in discussion