| 19 | |
| 20 | @Route('ExampleTest') |
| 21 | export class ExampleTestController { |
| 22 | /** |
| 23 | * @example path "an_example_path" |
| 24 | * @example path "an_example_path2" |
| 25 | */ |
| 26 | @Get('/path/{path}') |
| 27 | public async path(@Path() path: string): Promise<void> { |
| 28 | return; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * @example query "an_example_query" |
| 33 | * @example query "an_example_query2" |
| 34 | */ |
| 35 | @Get('/query') |
| 36 | public async query(@Query() query: string): Promise<void> { |
| 37 | return; |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * @example header "aaaaaaLongCookie" |
| 42 | * @example header "aaaaaaLongCookie2" |
| 43 | */ |
| 44 | @Get('/header') |
| 45 | public async header(@Header() header: string): Promise<void> { |
| 46 | return; |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * @example location { |
| 51 | * "contry": "1", |
| 52 | * "city": "1" |
| 53 | * } |
| 54 | * @example location { |
| 55 | * "contry": "2", |
| 56 | * "city": "2" |
| 57 | * } |
| 58 | */ |
| 59 | @Post('/post_body') |
| 60 | public async post(@Body() location: Location): Promise<void> { |
| 61 | return; |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * @example prop1 "prop1" |
| 66 | */ |
| 67 | @Post('/post_body_prop_single') |
| 68 | public async postBodyPropSingle(@BodyProp() prop1: string): Promise<void> { |
| 69 | return; |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * @example prop1 "prop1_1" |
| 74 | * @example prop1 "prop1_2" |
| 75 | * @example prop1 "prop1_3" |
| 76 | * @example prop2 "prop2_1" |
| 77 | * @example prop2 "prop2_2" |
| 78 | * @example prop2 "prop2_3" |