5
5
import io .swagger .annotations .ApiOperation ;
6
6
import lombok .RequiredArgsConstructor ;
7
7
import scanner .checklist .dto .CheckListDetailDto ;
8
- import scanner .checklist .dto .CheckListModifyDto ;
9
- import scanner .checklist .dto .CheckListSimpleDto ;
8
+ import scanner .checklist .dto .CheckListDto ;
10
9
import scanner .checklist .service .CheckListService ;
11
10
import scanner .common .dto .CommonResponse ;
12
11
import scanner .common .enums .Language ;
@@ -26,8 +25,8 @@ public class CheckListController {
26
25
@ ApiImplicitParams ({
27
26
@ ApiImplicitParam (name = "Authorization" , paramType = "header" , value = "Access Token" , required = true , dataTypeClass = String .class )})
28
27
@ GetMapping
29
- public CommonResponse <CheckListSimpleDto .Response > checkLists () {
30
- CheckListSimpleDto .Response dto = checkListService .getCheckLists (null );
28
+ public CommonResponse <CheckListDto .Response > checkLists () {
29
+ CheckListDto .Response dto = checkListService .getCheckLists (null );
31
30
32
31
return new CommonResponse <>(dto );
33
32
}
@@ -46,7 +45,7 @@ public CommonResponse<CheckListDetailDto.Detail> addCheckList(CheckListDetailDto
46
45
@ ApiImplicitParams ({
47
46
@ ApiImplicitParam (name = "Authorization" , paramType = "header" , value = "Access Token" , required = true , dataTypeClass = String .class ),
48
47
@ ApiImplicitParam (name = "ruleId" , paramType = "path" , value = "Checklist(rule) ID" , required = true , dataTypeClass = String .class , example = "CKV_NCP_1" ),
49
- @ ApiImplicitParam (name = "lang" , paramType = "query" , value = "eng, kor" , required = false , dataTypeClass = String .class )})
48
+ @ ApiImplicitParam (name = "lang" , paramType = "query" , value = "eng, kor" , dataTypeClass = String .class )})
50
49
@ GetMapping ("/{ruleId}" )
51
50
public CommonResponse <CheckListDetailDto .Detail > checkListDetails (@ PathVariable String ruleId ,
52
51
@ Nullable @ RequestParam String lang ) {
@@ -59,11 +58,11 @@ public CommonResponse<CheckListDetailDto.Detail> checkListDetails(@PathVariable
59
58
@ ApiImplicitParams ({
60
59
@ ApiImplicitParam (name = "Authorization" , paramType = "header" , value = "Access Token" , required = true , dataTypeClass = String .class ),
61
60
@ ApiImplicitParam (name = "ruleId" , paramType = "path" , value = "ruleId." , required = true , dataTypeClass = String .class ),
62
- @ ApiImplicitParam (name = "CheckListSimpleDto .Simple" , paramType = "body" , value = "Modify ruleOnOff n to y, y to n" , required = true , dataTypeClass = CheckListModifyDto .Modifying .class )})
61
+ @ ApiImplicitParam (name = "CheckListDto .Simple" , paramType = "body" , value = "Modify ruleOnOff n to y, y to n" , required = true , dataTypeClass = CheckListDto .Modifying .class )})
63
62
@ PatchMapping ("/{ruleId}" )
64
- public CommonResponse <CheckListSimpleDto . Simple > modifyCheckListDetails (@ PathVariable String ruleId ,
65
- @ RequestBody CheckListModifyDto .Modifying data ) {
66
- CheckListSimpleDto . Simple dto = checkListService .modifyCheckList (ruleId , data );
63
+ public CommonResponse <CheckListDto . Summary > modifyCheckListDetails (@ PathVariable String ruleId ,
64
+ @ RequestBody CheckListDto .Modifying data ) {
65
+ CheckListDto . Summary dto = checkListService .modifyCheckList (ruleId , data );
67
66
68
67
return new CommonResponse <>(dto );
69
68
}
@@ -72,22 +71,22 @@ public CommonResponse<CheckListSimpleDto.Simple> modifyCheckListDetails(@PathVar
72
71
@ ApiImplicitParams ({
73
72
@ ApiImplicitParam (name = "Authorization" , paramType = "header" , value = "Access Token" , required = true , dataTypeClass = String .class ),
74
73
@ ApiImplicitParam (name = "ruleId" , paramType = "path" , value = "ruleId." , required = true , dataTypeClass = String .class ),
75
- @ ApiImplicitParam (name = "CheckListSimpleDto.Simple " , paramType = "body" , value = "Modify ruleOnOff n to y, y to n" , required = true , dataTypeClass = CheckListModifyDto . State .class )})
74
+ @ ApiImplicitParam (name = "CheckListDto.RuleState " , paramType = "body" , value = "Modify ruleOnOff n to y, y to n" , required = true , dataTypeClass = CheckListDto . RuleState .class )})
76
75
@ PatchMapping ("/state/{ruleId}" )
77
- public CommonResponse <CheckListSimpleDto . Simple > modifyCheckListOnOff (@ PathVariable String ruleId ,
78
- @ RequestBody CheckListSimpleDto . Simple data ) {
79
- CheckListSimpleDto . Simple dto = checkListService .modifyCheckListAsOnOff (ruleId , data );
76
+ public CommonResponse <CheckListDto . Summary > modifyCheckListOnOff (@ PathVariable String ruleId ,
77
+ @ RequestBody CheckListDto . Summary data ) {
78
+ CheckListDto . Summary dto = checkListService .modifyCheckListAsOnOff (ruleId , data );
80
79
81
80
return new CommonResponse <>(dto );
82
81
}
83
82
84
83
@ ApiOperation (value = "Reset Checklist" , notes = "Reset custom checklist to origin." , response = CommonResponse .class )
85
84
@ ApiImplicitParams ({
86
85
@ ApiImplicitParam (name = "Authorization" , paramType = "header" , value = "Access Token" , required = true , dataTypeClass = String .class ),
87
- @ ApiImplicitParam (name = "CheckListSimpleDto .Simple" , paramType = "body" , value = "Body need ruleId." , required = true , dataTypeClass = CheckListSimpleDto . Simple .class )})
86
+ @ ApiImplicitParam (name = "CheckListDto .Simple" , paramType = "body" , value = "Body need ruleId." , required = true , dataTypeClass = CheckListDto . Summary .class )})
88
87
@ PostMapping ("/state" )
89
- public CommonResponse <CheckListSimpleDto . Simple > resetCheckList (@ RequestBody CheckListSimpleDto . Simple data ) {
90
- CheckListSimpleDto . Simple dto = checkListService .resetCheckList (data );
88
+ public CommonResponse <CheckListDto . Summary > resetCheckList (@ RequestBody CheckListDto . Summary data ) {
89
+ CheckListDto . Summary dto = checkListService .resetCheckList (data );
91
90
92
91
return new CommonResponse <>(dto );
93
92
}
0 commit comments