diff --git a/src/scripts/import-open-api.ts b/src/scripts/import-open-api.ts index d4f054a..008da19 100644 --- a/src/scripts/import-open-api.ts +++ b/src/scripts/import-open-api.ts @@ -461,7 +461,9 @@ export const generateRestfulComponent = ( needAResponseComponent ? ` export ${ - responseTypes.includes("|") ? `type ${componentName}Response =` : `interface ${componentName}Response` + responseTypes.includes("|") || responseTypes.includes("&") + ? `type ${componentName}Response =` + : `interface ${componentName}Response` } ${responseTypes} ` : ""