fix(batch): previewRestApiData 에 convertCamelToSnake 누락 보강 (400 원인)

데이터 불러오고 매핑하기 클릭 시 400 발생.
원인: 프론트는 camelCase (apiUrl/endpoint/method/apiKey/dataArrayPath/paramType/...)
로 body 를 보내는데 백엔드는 snake_case (api_url/endpoint/method/api_key/...) 키로 읽음.
다른 service 진입점 (updateBatchConfig / executeBatchConfig 등) 은 convertCamelToSnake
를 호출해서 자동 변환하는데 previewRestApiData 만 빠져있어 isBlank(apiUrl)=true 가
되며 IllegalArgumentException → 400.

수정: previewRestApiData 진입부에 convertCamelToSnake(body) 한 줄 추가.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
hjjeong
2026-05-13 15:11:33 +09:00
parent 6fcb101f59
commit b752de23a1
@@ -200,6 +200,10 @@ public class BatchManagementService extends BaseService {
// ── REST API Preview / Save ───────────────────────────────────────────────
public Map<String, Object> previewRestApiData(Map<String, Object> body) {
// 프론트는 camelCase 로 보내고 백엔드는 snake_case 로 읽음 — 변환 필요
// (updateBatchConfig / executeBatchConfig 와 동일 패턴. 누락되어 있던 것을 보강)
convertCamelToSnake(body);
String apiUrl = str(body.get("api_url"));
String endpoint = str(body.get("endpoint"));
String method = body.get("method") != null ? str(body.get("method")) : "GET";