Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/stream-file…
Browse files Browse the repository at this point in the history
…-param-decorator

# Conflicts:
#	src/metadata/parameterGenerator.ts
  • Loading branch information
t.chambard committed Oct 22, 2020
2 parents c002572 + 990aa14 commit 8b83a52
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/metadata/parameterGenerator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as ts from 'typescript';
import { getDecoratorName, getDecoratorOptions, getDecoratorTextValue } from '../utils/decoratorUtils';
import { MetadataGenerator, Parameter, Type } from './metadataGenerator';
import { getCommonPrimitiveAndArrayUnionType, getLiteralValue, resolveType } from './resolveType';
import { resolveType, getCommonPrimitiveAndArrayUnionType, getLiteralValue } from './resolveType';
import { getDecoratorName, getDecoratorTextValue, getDecoratorOptions } from '../utils/decoratorUtils';
import * as ts from 'typescript';

export class ParameterGenerator {
constructor(
Expand Down
12 changes: 12 additions & 0 deletions test/data/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,18 @@ export class ParameterizedEndpoint {
stream(@swagger.StreamFileParam('stream') file: Express.Multer.File): PrimitiveClassModel {
return new PrimitiveClassModel();
}

@Path('/file')
@POST
file(@FileParam('file') file: Express.Multer.File): PrimitiveClassModel {
return new PrimitiveClassModel();
}

@Path('/stream')
@POST
stream(@swagger.StreamFileParam('stream') file: Express.Multer.File): PrimitiveClassModel {
return new PrimitiveClassModel();
}
}

export abstract class Entity {
Expand Down

0 comments on commit 8b83a52

Please sign in to comment.