refac: external tool validation

This commit is contained in:
Timothy Jaeryang Baek 2025-10-02 01:29:44 -05:00
parent 2e75c6dbdf
commit 39675434f6

View file

@ -98,9 +98,16 @@
return;
}
if (path === '') {
toast.error($i18n.t('Please enter a valid path'));
return;
if (['openapi', ''].includes(type)) {
if (spec_type === 'json' && spec === '') {
toast.error($i18n.t('Please enter a valid JSON spec'));
return;
}
if (spec_type === 'url' && path === '') {
toast.error($i18n.t('Please enter a valid path'));
return;
}
}
if (direct) {