Closed enzoferey closed 1 year ago
I had a look at the readme file and it says:
typeconv doesn't support external references (to other files). If you have that, you need to use a reference parser and merge it into one inline-referenced file before using typeconv.
I have the same issue and not sure yet if I should squash types into one file, or run typeconv once per each file and collect the schemas via a program. Both options look difficult to do.
Right, I'll have to close this as simple not supported.
Merging typescript files into one is not just concatenating them, it requires language-level logic to do it right, so it makes more sense for other packages out there to do that job. Have a look at https://www.npmjs.com/package/dts-bundle-generator or https://www.npmjs.com/package/dts-generator they do precisely this.
Thanks for the references and explanations @menocomp @grantila ! This was a long time ago so I can't remember if the README was stating that at the time or not. If so, I'm sorry 👍🏻
Whenever you are transforming a TypeScript file to an OpenApi specification file, if you declare a type that reuses some other type that you import from a different file, the imported types are not included in the OpenApi specification file.
As an example this file:
generates:
however no
MyTypeB
component is generated inside the file.