typeconv icon indicating copy to clipboard operation
typeconv copied to clipboard

[ts-to-oapi] Imported types are transformed

Open enzoferey opened this issue 3 years ago • 0 comments

Whenever you are transforming a TypeScript file to an OpenApi specification file, if you declare a type that leverages some other type that you import from a different file, the imported types is not included in the OpenApi specification file.

As an example this file:

import type { MyTypeB } from "./some-file";

export type A = MyTypeB;

generates:

$ref: '#/components/schemas/MyTypeB'

however no MyTypeB component is generated inside the file.

enzoferey avatar Mar 26 '22 23:03 enzoferey