json-schema-to-typescript
json-schema-to-typescript copied to clipboard
Disable `This interface was referenced by ...` comments with `--unreachableDefinitions`
As the title is saying I was wondering if it is possible to disable the generation of reference comments when --unreachableDefinitions
is used. I had recently to enable this feature and I noticed that the generated TS file got polluted with all comments like the following:
/**
* This interface was referenced by `AJsonSchema`'s JSON-Schema
* via the `definition` "Adefinition".
*/
Why are these comments added? Can I disable them?
I pinpointed the place where this comment is added. Still, I don't understand why by default is not enabled and why with --unreachableDefinitions
it is enabled. https://github.com/bcherny/json-schema-to-typescript/blob/8ea10a61f0d4b24749ae033a37f9aa3fb9a94417/src/parser.ts#L389-L400