File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "language" : " ts" ,
3
- "collection" : " @nestjs/schematics" ,
4
- "sourceRoot" : " src"
2
+ "language" : " ts" ,
3
+ "collection" : " @nestjs/schematics" ,
4
+ "sourceRoot" : " src" ,
5
+ "compilerOptions" : {
6
+ "plugins" : [" @nestjs/swagger/plugin" ]
7
+ }
5
8
}
Original file line number Diff line number Diff line change
1
+ /* eslint-disable @typescript-eslint/naming-convention */
1
2
import { ApiBody } from '@nestjs/swagger' ;
2
3
import { SchemaObject } from '@nestjs/swagger/dist/interfaces/open-api-spec.interface' ;
3
4
4
- // eslint-disable-next-line @typescript-eslint/naming-convention
5
5
export const ApiFile = (
6
6
fileName = 'file' ,
7
7
options : Partial < { isRequired : boolean ; isArray : boolean } > = { } ,
@@ -22,9 +22,8 @@ export const ApiFile = (
22
22
items : fileSchema ,
23
23
} ;
24
24
}
25
- ApiBody ( {
25
+ return ApiBody ( {
26
26
required : isRequired ,
27
- type : 'multipart/form-data' ,
28
27
schema : {
29
28
type : 'object' ,
30
29
properties : {
Original file line number Diff line number Diff line change @@ -16,8 +16,13 @@ module.exports = {
16
16
rules : [
17
17
{
18
18
test : / \. t s x ? $ / ,
19
- use : 'ts-loader' ,
19
+ loader : 'ts-loader' ,
20
20
exclude : / n o d e _ m o d u l e s / ,
21
+ options : {
22
+ getCustomTransformers : ( program ) => ( {
23
+ before : [ require ( '@nestjs/swagger/plugin' ) . before ( { } , program ) ]
24
+ } ) ,
25
+ } ,
21
26
} ,
22
27
] ,
23
28
} ,
You can’t perform that action at this time.
0 commit comments