You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using basic types in a oneOf the generated code is importing the basic type like this:
Actual:
import type { TestA } from './TestA';
import type { TestB } from './TestB';
import type { string } from './string';
export type TestResponse = TestA | TestB | string;
Expected:
import type { TestA } from './TestA';
import type { TestB } from './TestB';
export type TestResponse = TestA | TestB | string;
When using arrays of refs in a oneOf it's the opposite, the referenced schemas are not imported:
Actual:
export type TestArrayResponse = Array<TestA> | Array<TestB> | Array<string>;
Expected:
import type { TestA } from './TestA';
import type { TestB } from './TestB';
export type TestArrayResponse = Array<TestA> | Array<TestB> | Array<string>;
Description
When using basic types in a oneOf the generated code is importing the basic type like this:
Actual:
Expected:
When using arrays of refs in a oneOf it's the opposite, the referenced schemas are not imported:
Actual:
Expected:
openapi-generator version
7.9.0 and latest master
OpenAPI declaration file content or url
https://gist.github.com/GregoryMerlet/fc7d7c2cb750d8d27eb064a613312b0c
Generation Details
typescript-fetch generator
Steps to reproduce
Generate using the yaml previously linked.
The text was updated successfully, but these errors were encountered: