json-schema-to-typescript
json-schema-to-typescript copied to clipboard
Compile JSON Schema to TypeScript type declarations
Cloning the repo and attempting to run the 'build' script crashes with the error below. The issue, as explained in [ESlint Config Update](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md) is that we are now to use...
Hi everyone, I have worked a bit with JSON schema to generate UI, validate models with AJV, and OpenAPI generators. I found this library while looking for projects to contribute...
I'm generating types based on the api's schema which works. However the results contains a lot of `export` which forces me to explicitly import the generated types. Since it's a...
We are facing a very strange behavior with `allOf`: the generated type is a _type alias_ instead of a proper type. Take this code sample: ```ts import {compile, JSONSchema} from...
My schema is pretty large, but I whittled it down to what's attached that seems to generate the issue. My code is as follows: ```javascript import { compileFromFile } from...
```js const { compile } = require('.'); const schema = { "title": "2022 Example Schema", "type": "object", "properties": { "id": { "type": "string", "example": "61e36b8fc12c4d8fd0842f76" } } }; compile(schema).then(ts =>...
https://github.com/bcherny/json-schema-to-typescript/pull/474 This PR is awesome, and I would appreciate so much if it is released.
Removes the safe-naming reapplication against `generateType` return values which might cause invalid typescript definition files when `strictIndexSignature` is used. ```diff interface MyInterface { - [k: string]: LeafUndefined; // error TS2304:...
When I try to read a file encoding in utf-8 BOM, it return a string with a "blank" as first character, I looked into the code and found this error:...
I searched a bit but didn't find any issues/discussion that looked relevant, please forgive me if I missed something. I'm dealing with an api that has `"sometype": {}` fields sometimes...