refac: external tool validation
This commit is contained in:
1 parent
2e75c6dbdf
commit
39675434f6
1 file changed
+10
-3
@@ -98,9 +98,16 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path === '') {
|
if (['openapi', ''].includes(type)) {
|
||||||
toast.error($i18n.t('Please enter a valid path'));
|
if (spec_type === 'json' && spec === '') {
|
||||||
return;
|
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) {
|
if (direct) {
|
||||||
|
|||||||
Reference in new issue
Block a user