ts-json-schema-generator icon indicating copy to clipboard operation
ts-json-schema-generator copied to clipboard

Type '*' is not working with expose 'none'

Open itpropro opened this issue 3 years ago • 3 comments

Without expose, all types including type names from a single file are generated. When I add expose: 'none', the type names are gone and are replaced with a single '*' type. When I configure type: '', random class names with long numbers are generated. Expected behavior: By just adding expose: 'none' and leaving everything else untouched, the schema should just inline the $ref in that respective class, not remove the whole class name. All class in my .ts file are exported.

itpropro avatar Oct 25 '22 01:10 itpropro

Can you send a patch?

domoritz avatar Oct 25 '22 02:10 domoritz

I have unfortunately no idea, how this library is implemented. My temporary fix is to add an external library that is able to dereference JSON schemas. There seem to be an essential problem with many of the possible configurations. By just trying a few combinations, there were a lot of side effects that should not appear with a single configuration change. It would be good if someone who implemented the configuration resolution logic could look into this.

itpropro avatar Oct 25 '22 14:10 itpropro

Did you have any time to look into this @domoritz ?

itpropro avatar Feb 20 '23 19:02 itpropro