From 118c94aed9b1de100f3121f1e7bf142e59162a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=98=81=EB=A1=9D?= <0rogyy@gmail.com> Date: Thu, 25 Sep 2025 11:44:09 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=85=9C=ED=94=8C=EB=A6=BF=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20=EC=8B=9C=20=EA=B8=B0=EB=B3=B8=20=EB=A7=A4=ED=95=91?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95=EC=9D=84=20=EC=B6=94=EA=B0=80=ED=95=98?= =?UTF-8?q?=EC=97=AC,=20=EC=B2=AB=20=EC=8B=A4=ED=96=89=20=EC=8B=9C,=20?= =?UTF-8?q?=EC=BF=BC=EB=A6=AC=EC=8A=A4=ED=8A=B8=EB=A7=81=EC=9D=B4=20?= =?UTF-8?q?=EB=B0=98=EC=98=81=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 선택된 템플릿의 경로 및 쿼리 템플릿에서 기본 매핑을 추출하여 설정하도록 수정 - 매핑이 명시적으로 존재하도록 하여 실행 시 의존성을 명확히 함 --- src/renderer/components/SortableStepItem.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/renderer/components/SortableStepItem.tsx b/src/renderer/components/SortableStepItem.tsx index 075110f..a1ef713 100644 --- a/src/renderer/components/SortableStepItem.tsx +++ b/src/renderer/components/SortableStepItem.tsx @@ -78,6 +78,20 @@ export const SortableStepItem: React.FC = ({ const handleTemplateSelect = (templateId: string) => { const template = httpTemplates.find(t => t.id === templateId); if (template) { + // Seed default mappings so execution can rely on explicit entries + const pathParams = extractPathParams(template.pathTemplate); + const queryParams = extractQueryParams(template.queryTemplate); + + const defaultParamMappings = pathParams.reduce>((acc, param) => { + acc[param] = step.params?.paramMappings?.[param] ?? { type: 'auto' }; + return acc; + }, {}); + + const defaultQueryMappings = queryParams.reduce>((acc, param) => { + acc[param] = step.params?.queryMappings?.[param] ?? { type: 'auto' }; + return acc; + }, {}); + onUpdateStep(step.id, { params: { ...step.params, @@ -85,6 +99,8 @@ export const SortableStepItem: React.FC = ({ baseUrl: template.baseUrl, pathTemplate: template.pathTemplate, queryTemplate: template.queryTemplate, + paramMappings: defaultParamMappings, + queryMappings: defaultQueryMappings, // 출력 타입 초기화 outputType: step.params?.outputType || 'full', }