mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
验证提示优化
This commit is contained in:
@@ -93,6 +93,14 @@ public class ApiValidator implements Validator {
|
||||
* @param param 接口参数
|
||||
*/
|
||||
protected void checkEnable(ApiParam param) {
|
||||
String name = param.fetchName();
|
||||
if (name == null) {
|
||||
throw ErrorEnum.ISV_MISSING_METHOD.getErrorMeta().getException();
|
||||
}
|
||||
String version = param.fetchVersion();
|
||||
if (version == null) {
|
||||
throw ErrorEnum.ISV_MISSING_VERSION.getErrorMeta().getException();
|
||||
}
|
||||
String routeId = param.fetchNameVersion();
|
||||
// 检查路由是否存在
|
||||
RouteRepositoryContext.checkExist(routeId, ErrorEnum.ISV_INVALID_METHOD);
|
||||
|
Reference in New Issue
Block a user