Skip to content

Commit 9bc704a

Browse files
author
Teddy Chambard
committed
Fix missing conditions
1 parent d13f28f commit 9bc704a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/metadata/parameterGenerator.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class ParameterGenerator {
9393
return {
9494
description: this.getParameterDescription(parameter),
9595
in: 'formData',
96-
name: getDecoratorTextValue(this.parameter, ident => ident.text === 'FileParam') || parameterName,
96+
name: getDecoratorTextValue(this.parameter, ident => ident.text === 'FileParam' || ident.text === 'StreamFileParam') || parameterName,
9797
parameterName,
9898
required: !parameter.questionToken,
9999
type: { typeName: 'file' }
@@ -110,7 +110,7 @@ export class ParameterGenerator {
110110
return {
111111
description: this.getParameterDescription(parameter),
112112
in: 'formData',
113-
name: getDecoratorTextValue(this.parameter, ident => ident.text === 'FilesParam') || parameterName,
113+
name: getDecoratorTextValue(this.parameter, ident => ident.text === 'FilesParam' || ident.text === 'StreamFilesParam') || parameterName,
114114
parameterName,
115115
required: !parameter.questionToken,
116116
type: { typeName: 'file' }
@@ -259,7 +259,7 @@ export class ParameterGenerator {
259259
return ['HeaderParam', 'QueryParam', 'Param', 'FileParam',
260260
'PathParam', 'FilesParam', 'FormParam', 'CookieParam',
261261
'Context', 'ContextRequest', 'ContextResponse', 'ContextNext',
262-
'ContextLanguage', 'ContextAccept'].some(d => d === decoratorName);
262+
'ContextLanguage', 'ContextAccept', 'StreamFileParam', 'StreamFilesParam'].some(d => d === decoratorName);
263263
}
264264

265265
private supportPathDataType(parameterType: Type) {

0 commit comments

Comments
 (0)