test api 추가, 개발서버 토큰 만료시간 조정
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
package com.kamco.cd.kamcoback.test;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.ErrorResponse;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Tag(name = "test api", description = "test api")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/test")
|
||||
public class TestApiController {
|
||||
|
||||
@Operation(summary = "admin test", description = "admin test api")
|
||||
@ApiResponses({
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회",
|
||||
content = @Content(schema = @Schema(implementation = String.class))),
|
||||
@ApiResponse(
|
||||
responseCode = "403",
|
||||
description = "권한 없음",
|
||||
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))
|
||||
})
|
||||
@GetMapping("/admin")
|
||||
public String admin() {
|
||||
return "I am administrator";
|
||||
}
|
||||
|
||||
@Operation(summary = "label test", description = "label test api")
|
||||
@ApiResponses({
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회",
|
||||
content = @Content(schema = @Schema(implementation = String.class))),
|
||||
@ApiResponse(
|
||||
responseCode = "403",
|
||||
description = "권한 없음",
|
||||
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))
|
||||
})
|
||||
@GetMapping("/label")
|
||||
public String label() {
|
||||
return "Labeling is available.";
|
||||
}
|
||||
|
||||
@Operation(summary = "review test", description = "review test api")
|
||||
@ApiResponses({
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회",
|
||||
content = @Content(schema = @Schema(implementation = String.class))),
|
||||
@ApiResponse(
|
||||
responseCode = "403",
|
||||
description = "권한 없음",
|
||||
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))
|
||||
})
|
||||
@GetMapping("/review")
|
||||
public String review() {
|
||||
return "Review is available.";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user