권한 테스트 api 수정

This commit is contained in:
2025-12-12 10:02:08 +09:00
parent 79267e82d7
commit 970d08ba44
5 changed files with 74 additions and 59 deletions

View File

@@ -1,5 +1,6 @@
package com.kamco.cd.kamcoback.test;
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -21,48 +22,48 @@ public class TestApiController {
@Operation(summary = "admin test", description = "admin test api")
@ApiResponses({
@ApiResponse(
responseCode = "200",
description = "조회",
content = @Content(schema = @Schema(implementation = String.class))),
responseCode = "200",
description = "조회",
content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(
responseCode = "403",
description = "권한 없음",
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))
responseCode = "403",
description = "권한 없음",
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))
})
@GetMapping("/admin")
public String admin() {
return "I am administrator";
public ApiResponseDto<String> admin() {
return ApiResponseDto.ok("I am administrator");
}
@Operation(summary = "label test", description = "label test api")
@ApiResponses({
@ApiResponse(
responseCode = "200",
description = "조회",
content = @Content(schema = @Schema(implementation = String.class))),
responseCode = "200",
description = "조회",
content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(
responseCode = "403",
description = "권한 없음",
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))
responseCode = "403",
description = "권한 없음",
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))
})
@GetMapping("/label")
public String label() {
return "Labeling is available.";
public ApiResponseDto<String> label() {
return ApiResponseDto.ok("Labeling is available.");
}
@Operation(summary = "review test", description = "review test api")
@ApiResponses({
@ApiResponse(
responseCode = "200",
description = "조회",
content = @Content(schema = @Schema(implementation = String.class))),
responseCode = "200",
description = "조회",
content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(
responseCode = "403",
description = "권한 없음",
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))
responseCode = "403",
description = "권한 없음",
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))
})
@GetMapping("/review")
public String review() {
return "Review is available.";
public ApiResponseDto<String> review() {
return ApiResponseDto.ok("Review is available.");
}
}