Skip to content
This repository was archived by the owner on Nov 11, 2023. It is now read-only.

Commit 476f583

Browse files
authored
Merge pull request #381 from dcruzin/fix-anyof-response-body
Fix allOf in responseBodies generation
2 parents c77e52e + d914ac4 commit 476f583

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scripts/import-open-api.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,9 @@ export const generateRestfulComponent = (
461461
needAResponseComponent
462462
? `
463463
export ${
464-
responseTypes.includes("|") ? `type ${componentName}Response =` : `interface ${componentName}Response`
464+
responseTypes.includes("|") || responseTypes.includes("&")
465+
? `type ${componentName}Response =`
466+
: `interface ${componentName}Response`
465467
} ${responseTypes}
466468
`
467469
: ""

0 commit comments

Comments
 (0)