-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pref:完善研发商店组件配置文件参数校验 #11269 #11287
base: master
Are you sure you want to change the base?
pref:完善研发商店组件配置文件参数校验 #11269 #11287
Conversation
…o issue_11269 # Conflicts: # support-files/i18n/store/message_en_US.properties
throw ErrorCodeException( | ||
errorCode = StoreMessageCode.USER_ATOM_OUTPUT_NUM_IS_TOO_MANY, | ||
params = arrayOf(maxOutputNum.toString()) | ||
errorCode = StoreMessageCode.USER_ATOM_INPUT_NUM_IS_TOO_MANY, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
错误码怎么一刀切了,原来输出变量个数超了也用输出变量的错误码
@@ -109,6 +109,8 @@ | |||
2120935=When the queryProjectComponentFlag, installed, or updateFlag parameters are not empty, the projectCode parameter must be non-empty | |||
2120936=store: Unreleased versions are not allowed to be removed from the shelves | |||
2120937=store: Code library deletion failed, failure reason: {0} | |||
|
|||
2120043=store: In the plugin configuration file [task.json], the field {0} contains the subfield {1}, which currently only supports {2} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
错误码描述要排列规律,别乱放
) | ||
} | ||
return GetAtomConfigResult("0", arrayOf(""), taskDataMap, atomEnvRequests) | ||
|
||
dataMap.values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这段代码看起来只是校验支持的输出类型吧,其他情况根本无需执行吧,建议单独抽出来
private fun <T : Any> validateTaskJsonField( | ||
inputGroupMap: Map<String, Any>, | ||
fieldName: String, | ||
expectedType: KClass<T> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个方法参数你加一个是否必填字段看起来更清晰,必填才需要校验是否非空
) | ||
} | ||
// pref:完善研发商店组件配置文件参数校验 #11269 | ||
val supportedLanguages = setOf(JAVA, PYTHON, GOLANG, NODEJS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个和输出变量目前只支持三种类型的逻辑类似,统一封装一个公共方法,别各写各的
No description provided.