-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91ad339
commit 0682fc3
Showing
2 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,5 +36,4 @@ out/ | |
### VS Code ### | ||
.vscode/ | ||
|
||
.env | ||
application.yml |
26 changes: 22 additions & 4 deletions
26
src/main/java/com/umc/networkingService/domain/test/controller/TestController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
package com.umc.networkingService.domain.test.controller; | ||
|
||
import io.swagger.v3.oas.annotations.Hidden; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@Tag(name = "예제 API", description = "Swagger 테스트용 API") | ||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/test") | ||
public class TestController { | ||
@Operation(summary = "문자열 반복", description = "파라미터로 받은 문자열을 2번 반복합니다.") | ||
@Parameter(name = "str", description = "2번 반복할 문자열") | ||
@GetMapping("/returnStr") | ||
public String returnStr(@RequestParam String str) { | ||
return str + "\n" + str; | ||
} | ||
|
||
@GetMapping("/example") | ||
public String example() { | ||
return "예시 API"; | ||
} | ||
|
||
@GetMapping | ||
public String getTest() { | ||
return "kimjunseok"; | ||
@Hidden | ||
@GetMapping("/ignore") | ||
public String ignore() { | ||
return "무시되는 API"; | ||
} | ||
} | ||
} |