You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/11/28 03:41:05 UTC

[GitHub] [dolphinscheduler] zhongjiajie commented on a diff in pull request #12340: [Fix-12339][Api] Fix optional query parameter miss default value issue #12339

zhongjiajie commented on code in PR #12340:
URL: https://github.com/apache/dolphinscheduler/pull/12340#discussion_r1033094980


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java:
##########
@@ -158,7 +158,7 @@ public Result updateSchedule(@ApiIgnore @RequestAttribute(value = SESSION_USER)
                                  @PathVariable(value = "id") Integer id,
                                  @RequestParam(value = "schedule") String schedule,
                                  @RequestParam(value = "warningType", required = false, defaultValue = DEFAULT_WARNING_TYPE) WarningType warningType,
-                                 @RequestParam(value = "warningGroupId", required = false) int warningGroupId,
+                                 @RequestParam(value = "warningGroupId", required = false, defaultValue = DEFAULT_NOTIFY_GROUP_ID) int warningGroupId,

Review Comment:
   > if value of `warningType` is `WarningType .NONE` , value of `warningGroupId` should be null. so i don't think `warningGroupId` be point default value. maybe we should change the type of `warningGroupId` to Integer .WDYT? cc @SbloodyS @EricGao888 @caishunfeng
   
   I agree with that, we should still make `warningGroupId` optional



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org