File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 442442 "type" : " object"
443443 }
444444 },
445+ {
446+ "name" : " catBreeds" ,
447+ "required" : true ,
448+ "in" : " query" ,
449+ "schema" : {
450+ "type" : " array" ,
451+ "items" : {
452+ "type" : " string" ,
453+ "enum" : [
454+ " persian" ,
455+ " siamese" ,
456+ " maine-coon"
457+ ]
458+ }
459+ }
460+ },
445461 {
446462 "name" : " x-tenant-id" ,
447463 "in" : " header" ,
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { CatsService } from './cats.service';
1818import { Cat } from './classes/cat.class' ;
1919import { CreateCatDto } from './dto/create-cat.dto' ;
2020import { LettersEnum , PaginationQuery } from './dto/pagination-query.dto' ;
21+ import { CatBreed } from './enums/cat-breed.enum' ;
2122
2223@ApiSecurity ( 'basic' )
2324@ApiBearerAuth ( )
@@ -104,6 +105,11 @@ export class CatsController {
104105 { lang : 'JavaScript' , source : "console.log('Hello World');" }
105106 ] )
106107 @ApiExtension ( 'x-multiple' , { test : 'test' } )
108+ @ApiQuery ( {
109+ name : 'catBreeds' ,
110+ enum : CatBreed ,
111+ isArray : true
112+ } )
107113 @ApiTags ( 'tag1' )
108114 @ApiTags ( 'tag2' )
109115 findAll ( @Query ( ) paginationQuery : PaginationQuery ) { }
Original file line number Diff line number Diff line change 1+ export enum CatBreed {
2+ Persian = 'persian' ,
3+ Siamese = 'siamese' ,
4+ MaineCoon = 'maine-coon'
5+ }
You can’t perform that action at this time.
0 commit comments