diff --git a/frontend/src/api/bypassApi.ts b/frontend/src/api/bypassApi.ts index a90532b..046258c 100644 --- a/frontend/src/api/bypassApi.ts +++ b/frontend/src/api/bypassApi.ts @@ -17,25 +17,14 @@ export interface BypassParamDto { sortOrder: number; } -export interface BypassFieldDto { - id?: number; - fieldName: string; - jsonProperty: string | null; - fieldType: string; // String, Integer, Long, Double, Boolean, LocalDateTime, List, Object - description: string; - sortOrder: number; -} - export interface BypassConfigRequest { domainName: string; displayName: string; webclientBean: string; externalPath: string; httpMethod: string; - responseType: string; description: string; params: BypassParamDto[]; - fields: BypassFieldDto[]; } export interface BypassConfigResponse { @@ -46,20 +35,17 @@ export interface BypassConfigResponse { webclientBean: string; externalPath: string; httpMethod: string; - responseType: string; description: string; generated: boolean; generatedAt: string | null; createdAt: string; updatedAt: string; params: BypassParamDto[]; - fields: BypassFieldDto[]; } export interface CodeGenerationResult { controllerPath: string; servicePaths: string[]; - dtoPaths: string[]; message: string; } @@ -117,16 +103,6 @@ export const bypassApi = { deleteJson>(`${BASE}/${id}`), generateCode: (id: number, force = false) => postJson>(`${BASE}/${id}/generate?force=${force}`), - parseJson: async (jsonSample: string, targetField?: string): Promise> => { - const params = targetField ? `?targetField=${encodeURIComponent(targetField)}` : ''; - const res = await fetch(`${BASE}/parse-json${params}`, { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: jsonSample, // 이미 JSON 문자열이므로 JSON.stringify 하지 않음 - }); - if (!res.ok) throw new Error(`API Error: ${res.status} ${res.statusText}`); - return res.json(); - }, getWebclientBeans: () => fetchJson>(`${BASE}/webclient-beans`), }; diff --git a/frontend/src/components/bypass/BypassConfigModal.tsx b/frontend/src/components/bypass/BypassConfigModal.tsx index edec66b..6a3b854 100644 --- a/frontend/src/components/bypass/BypassConfigModal.tsx +++ b/frontend/src/components/bypass/BypassConfigModal.tsx @@ -3,12 +3,10 @@ import type { BypassConfigRequest, BypassConfigResponse, BypassParamDto, - BypassFieldDto, WebClientBeanInfo, } from '../../api/bypassApi'; import BypassStepBasic from './BypassStepBasic'; import BypassStepParams from './BypassStepParams'; -import BypassStepFields from './BypassStepFields'; interface BypassConfigModalProps { open: boolean; @@ -18,21 +16,19 @@ interface BypassConfigModalProps { onClose: () => void; } -type StepNumber = 1 | 2 | 3; +type StepNumber = 1 | 2; const STEP_LABELS: Record = { 1: '기본 정보', 2: '파라미터', - 3: 'DTO 필드', }; -const DEFAULT_FORM: Omit = { +const DEFAULT_FORM: Omit = { domainName: '', displayName: '', webclientBean: '', externalPath: '', httpMethod: 'GET', - responseType: 'LIST', description: '', }; @@ -49,10 +45,8 @@ export default function BypassConfigModal({ const [webclientBean, setWebclientBean] = useState(''); const [externalPath, setExternalPath] = useState(''); const [httpMethod, setHttpMethod] = useState('GET'); - const [responseType, setResponseType] = useState('LIST'); const [description, setDescription] = useState(''); const [params, setParams] = useState([]); - const [fields, setFields] = useState([]); const [saving, setSaving] = useState(false); useEffect(() => { @@ -64,20 +58,16 @@ export default function BypassConfigModal({ setWebclientBean(editConfig.webclientBean); setExternalPath(editConfig.externalPath); setHttpMethod(editConfig.httpMethod); - setResponseType(editConfig.responseType); setDescription(editConfig.description); setParams(editConfig.params); - setFields(editConfig.fields); } else { setDomainName(DEFAULT_FORM.domainName); setDisplayName(DEFAULT_FORM.displayName); setWebclientBean(DEFAULT_FORM.webclientBean); setExternalPath(DEFAULT_FORM.externalPath); setHttpMethod(DEFAULT_FORM.httpMethod); - setResponseType(DEFAULT_FORM.responseType); setDescription(DEFAULT_FORM.description); setParams([]); - setFields([]); } }, [open, editConfig]); @@ -90,7 +80,6 @@ export default function BypassConfigModal({ case 'webclientBean': setWebclientBean(value); break; case 'externalPath': setExternalPath(value); break; case 'httpMethod': setHttpMethod(value); break; - case 'responseType': setResponseType(value); break; case 'description': setDescription(value); break; } }; @@ -104,10 +93,8 @@ export default function BypassConfigModal({ webclientBean, externalPath, httpMethod, - responseType, description, params, - fields, }); onClose(); } finally { @@ -115,7 +102,7 @@ export default function BypassConfigModal({ } }; - const steps: StepNumber[] = [1, 2, 3]; + const steps: StepNumber[] = [1, 2]; return (
)} - {step === 3 && ( - - )}
{/* 하단 버튼 */} @@ -213,7 +196,7 @@ export default function BypassConfigModal({ 취소 )} - {step < 3 ? ( + {step < 2 ? ( - ))} - - - {/* 설명 */}