No schema generated for re-exported types unless named with --type
See original GitHub issueHello, I want to generate JSON schema for all types imported in a file: schemas.ts
import { TestClass } from './src/test_class';
import { Task } from './src/task';
...
For a single type this works:
./node_modules/.bin/ts-json-schema-generator --path 'schemas.ts' --type 'TestClass'
But for all types, I get no definitions
./node_modules/.bin/ts-json-schema-generator --path 'schemas.ts' --type '*'
BTW, your CLI usage example might be wrong, 'my/project/**.*.ts'
should be 'my/project/**/*.ts'
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:7 (5 by maintainers)
Top Results From Across the Web
External enums not re-exported from generated types.ts break ...
Describe the bug If external enums (either explicit mapping Role:./enums#MyRole or the new single file option #2038) used in combination ...
Read more >[GA4] BigQuery Export schema - Analytics Help
Field name Data type Description
app_info RECORD A record of information on the app.
app_info.id STRING The package name or bundle ID of the app.
app_info.firebase_app_id...
Read more >How to solve the "module has no exported member" error?
Remove the line below from your statement export module Demo. and use it like export class ViewModel { constructor(public test: string) { }...
Read more >Zapatos: Zero-Abstraction Postgres for TypeScript - Jawj
Exactly the kind of 'use SQL in typescript code with type-safety' non-ORM that ... We run npx zapatos to generate a file named...
Read more >Common Errors with Exporting and Importing Translation Files
If it doesn't exist in the exported translation file, delete the identified key from the translation file. Invalid key: <key>. The key's translation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, I can confirm the issue. We probably don’t show types that are not defined in a file and only re-exported. To fix this, you can step through the code with a debugger. Can you send a pull request?
Still does not work
… and just in case:
…no luck