daniel 작업 내용 커밋

This commit is contained in:
2026-04-09 09:16:42 +09:00
parent 501b4a6f51
commit 59d39a79c3
10 changed files with 1189 additions and 2 deletions

View File

@@ -37,6 +37,7 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -366,4 +367,42 @@ public class ModelTrainDetailApiController {
@Parameter(description = "모델 uuid") @PathVariable UUID uuid) {
return ApiResponseDto.ok(modelTrainDetailService.cleanup(uuid));
}
@Operation(
summary = "학습 결과 ZIP 파일 전체 다운로드",
description =
"모델 UUID에 해당하는 모든 ZIP 파일 목록을 조회하고" + "생성된 모든 학습데이터의 ZIP 파일을 하나의 ZIP 파일로 압축하여 다운로드",
parameters = {
@Parameter(
name = "kamco-download-uuid",
in = ParameterIn.HEADER,
required = true,
description = "다운로드 요청 UUID",
schema =
@Schema(
type = "string",
format = "uuid",
example = "6d8d49dc-0c9d-4124-adc7-b9ca610cc394"))
})
@ApiResponses(
value = {
@ApiResponse(
responseCode = "200",
description = "학습데이터 zip파일 다운로드",
content =
@Content(
mediaType = "application/octet-stream",
schema = @Schema(type = "string", format = "binary"))),
@ApiResponse(responseCode = "404", description = "모델 또는 파일 없음", content = @Content),
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
})
@GetMapping("/downloadzip/{uuid}")
public ResponseEntity<?> downloadZip(
@Parameter(description = "모델 UUID") @PathVariable UUID uuid,
@Parameter(hidden = true) @RequestHeader("kamco-download-uuid") String downloadUuid,
HttpServletRequest request)
throws IOException {
return modelTrainDetailService.downloadZipFile(uuid, downloadUuid, request);
}
}