File tree 4 files changed +20
-5
lines changed
test/plugin/fixtures/project/cats/dto
4 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 293
293
"title" : " Page" ,
294
294
"format" : " int32" ,
295
295
"default" : 0 ,
296
+ "example" : 123 ,
296
297
"type" : " number"
297
298
}
298
299
},
302
303
"in" : " query" ,
303
304
"schema" : {
304
305
"nullable" : true ,
306
+ "example" : [
307
+ " sort1" ,
308
+ " sort2"
309
+ ],
305
310
"type" : " array" ,
306
311
"items" : {
307
312
"type" : " string"
490
495
"title" : " Page" ,
491
496
"format" : " int32" ,
492
497
"default" : 0 ,
498
+ "example" : 123 ,
493
499
"type" : " number"
494
500
}
495
501
},
499
505
"required" : true ,
500
506
"schema" : {
501
507
"nullable" : true ,
508
+ "example" : [
509
+ " sort1" ,
510
+ " sort2"
511
+ ],
502
512
"type" : " array" ,
503
513
"items" : {
504
514
"type" : " string"
Original file line number Diff line number Diff line change @@ -14,13 +14,15 @@ export class PaginationQuery {
14
14
exclusiveMaximum : true ,
15
15
exclusiveMinimum : true ,
16
16
format : 'int32' ,
17
- default : 0
17
+ default : 0 ,
18
+ example : 123
18
19
} )
19
20
page : number ;
20
21
21
22
@ApiProperty ( {
22
23
name : '_sortBy' ,
23
- nullable : true
24
+ nullable : true ,
25
+ example : [ 'sort1' , 'sort2' ]
24
26
} )
25
27
sortBy : string [ ] ;
26
28
Original file line number Diff line number Diff line change @@ -157,7 +157,8 @@ export class SwaggerTypesMapper {
157
157
'format' ,
158
158
'pattern' ,
159
159
'nullable' ,
160
- 'default'
160
+ 'default' ,
161
+ 'example'
161
162
] ;
162
163
}
163
164
}
Original file line number Diff line number Diff line change @@ -14,13 +14,15 @@ export class PaginationQuery {
14
14
exclusiveMaximum : true ,
15
15
exclusiveMinimum : true ,
16
16
format : 'int32' ,
17
- default : 0
17
+ default : 0 ,
18
+ example : 123
18
19
} )
19
20
page : number ;
20
21
21
22
@ApiProperty ( {
22
23
name : '_sortBy' ,
23
- nullable : true
24
+ nullable : true ,
25
+ example : [ 'sort1' , 'sort2' ]
24
26
} )
25
27
sortBy : string [ ] ;
26
28
You can’t perform that action at this time.
0 commit comments