Hey @ThomasAribart, first of all thank you for this amazing piece of work. I did not expect that something like this is possible with TS. It feels like black magic, but in a good way ;)
I'd like to suggest one FAQ addition:
Not sure if I missed it in the docs, but I ran into an issue with ref resolving and it took me a couple of hours to figure out what's wrong.
I've set up a new project with the help of Nx, but missed the point that Nx by default creates a tsconfig without
"compilerOptions": {
"strict": true, // <-- missing flag
...
}
json-schema-to-ts worked as normal (used it in other projects already) until I added a $ref to a schema. Even thought I did exactly the same as in other projects, it did not resolve the references passed as option to FromSchema.
Enabling TS compiler strict mode solved the issue.
Is this known behavior? Is it worth to add it to the FAQ section of the readme?
Hey @ThomasAribart, first of all thank you for this amazing piece of work. I did not expect that something like this is possible with TS. It feels like black magic, but in a good way ;)
I'd like to suggest one FAQ addition:
Not sure if I missed it in the docs, but I ran into an issue with ref resolving and it took me a couple of hours to figure out what's wrong. I've set up a new project with the help of Nx, but missed the point that Nx by default creates a
tsconfig
withoutjson-schema-to-ts worked as normal (used it in other projects already) until I added a
$ref
to a schema. Even thought I did exactly the same as in other projects, it did not resolve thereferences
passed as option toFromSchema
.Enabling TS compiler strict mode solved the issue.
Is this known behavior? Is it worth to add it to the FAQ section of the readme?