{"base_path":"/","components":null,"consumes":"","definitions":{"ErrorResponse":{"properties":{"error_code":{"description":"错误码","example":"CC.00000000","type":"string"},"error_msg":{"description":"错误描述","example":"网络繁忙,请稍后再试","type":"string"}}},"MetricInfo":{"description":"度量项","properties":{"cca_cyclomatic_complexity_per_method":{"description":"cca平均圈复杂度","example":"7.25","type":"string"},"cca_cyclomatic_complexity_total":{"description":"cca圈复杂度总数","example":"26693.00","type":"string"},"code_duplication_ratio":{"description":"代码重复率","example":"8.00","type":"string"},"code_duplication_total":{"description":"代码重复数","example":"11782.00","type":"string"},"code_size":{"description":"代码规模","example":"133426.00","type":"string"},"cyclomatic_complexity_adequacy":{"description":"圈复杂度满足度","example":"21.00","type":"string"},"cyclomatic_complexity_per_method":{"description":"平均圈复杂度","example":"7.43","type":"string"},"cyclomatic_complexity_total":{"description":"圈复杂度总数","example":"27435.00","type":"string"},"file_duplication_ratio":{"description":"文件重复率","example":"2.0","type":"string"},"file_duplication_total":{"description":"重复文件数","example":"2.0","type":"string"},"files_total":{"description":"文件总数","example":"629.00","type":"string"},"folders_total":{"description":"目录总数","example":"426.00","type":"string"},"huge_cca_cyclomatic_complexity_total":{"description":"超大圈复杂度函数总数","example":"148.00","type":"string"},"huge_cyclomatic_complexity_ratio":{"description":"超大圈复杂度比例","example":"4.13","type":"string"},"huge_cyclomatic_complexity_total":{"description":"超大圈复杂度数","example":"167.00","type":"string"},"huge_depth_ratio":{"description":"超大深度占比","example":"91546.00","type":"string"},"huge_depth_total":{"description":"超大深度数","example":"8.85","type":"string"},"huge_folder_ratio":{"description":"超大目录占比","example":"0.0","type":"string"},"huge_folder_total":{"description":"超大目录数","example":"0.0","type":"string"},"huge_headerfile_ratio":{"description":"超大头文件占比","example":"0.00","type":"string"},"huge_headerfile_total":{"description":"超大头文件数","example":"0.00","type":"string"},"huge_method_ratio":{"description":"超大函数占比","example":"8.04","type":"string"},"huge_method_total":{"description":"超大函数数","example":"321","type":"string"},"huge_non_headerfile_ratio":{"description":"超大源文件占比","example":"11.40","type":"string"},"huge_non_headerfile_total":{"description":"超大源文件数","example":"7.00","type":"string"},"lines_per_file":{"description":"文件平均代码行","example":"1700.93","type":"string"},"lines_per_method":{"description":"函数平均代码行","example":"8.04","type":"string"},"maximum_cca_cyclomatic_complexity":{"description":"cca最大圈复杂度","example":"342.00","type":"string"},"maximum_cyclomatic_complexity":{"description":"最大圈复杂度","example":"346.00","type":"string"},"maximum_depth":{"description":"最大深度","example":"333.00","type":"string"},"method_lines":{"description":"函数总行数","example":"91546.00","type":"string"},"methods_total":{"description":"函数总数","example":"6840.00","type":"string"},"non_hfile_code_duplication_ratio":{"description":"源文件代码重复率","example":"17.17","type":"string"},"non_hfile_code_duplication_total":{"description":"源文件代码重复数","example":"11782","type":"string"},"non_hfile_duplication_ratio":{"description":"源文件重复率","example":"2.0","type":"string"},"non_hfile_duplication_total":{"description":"重复源文件数","example":"2.0","type":"string"},"raw_lines":{"description":"原始代码行数","example":"182082.00","type":"string"},"redundant_code_kloc":{"description":"冗余代码块密度","example":"0","type":"string"},"redundant_code_total":{"description":"冗余代码数","example":"0","type":"string"},"unsafe_functions_kloc":{"description":"危险函数密度","example":"0","type":"string"},"unsafe_functions_total":{"description":"危险函数总数","example":"0","type":"string"},"warning_suppression_kloc":{"description":"抑制告警密度","example":"0","type":"string"},"warning_suppression_total":{"description":"抑制告警数","example":"0","type":"string"}}},"TaskMetricInfo":{"properties":{"check_type":{"description":"检查类型","example":"source","type":"string"},"created_at":{"description":"创建时间","example":"2020-02-20 11:21:11","type":"string"},"creator_id":{"description":"创建者id","example":"a2b9a42ee649xxxx94f5655f8535920e","type":"string"},"git_branch":{"description":"代码仓分支","example":"portal-ts","type":"string"},"git_url":{"description":"代码仓地址","example":"https://codehub.alpha.devcloud.inhuawei.com/******","type":"string"},"last_check_time":{"description":"上一次检查时间","example":"2020-02-20 11:37:46","type":"string"},"last_exec_time":{"description":"上次执行时间","example":"2 分 28 秒","type":"string"},"metric_info":{"$ref":"#/definitions/MetricInfo"},"task_id":{"description":"任务id","example":"b9db371361724xxxx6937f3280df1d4fc4","type":"string"},"task_name":{"description":"任务名字","example":"test","type":"string"}}}},"description":null,"group_id":"6e24e1d8225c45beaaeeceee605429ba","host":"codecheck-ext.cn-north-4.myhuaweicloud.com","id":"5d1b8fd348d840869de306d58c7387aa","info_version":"v2","method":"get","name":"ShowTaskCmetrics","parameters":{},"paths":{"/v2/{project_id}/tasks/{task_id}/metrics-summary":{"get":{"consumes":["application/json"],"deprecated":false,"description":"根据检查任务ID查询cmertrics缺陷概要。","operationId":"ShowTaskCmetrics","parameters":[{"description":"通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":100000,"minLength":1,"name":"X-Auth-Token","required":true,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXX..."},{"description":"项目ID","in":"path","name":"project_id","required":true,"type":"string","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"},{"description":"任务ID","in":"path","name":"task_id","required":true,"type":"string","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"}],"produces":["application/json"],"responses":{"200":{"description":"Request succeeded!","examples":{"application/json":{"check_type":"source","created_at":"2020-02-20 11:21:11","creator_id":"ecadebb5041146cc96f9780f3d905e20","git_branch":"master","git_url":"git@codehub.dev****_02201119.git","last_check_time":"2020-02-20 11:37:46","last_exec_time":"2020-02-20 11:37:46","metric_info":{"cca_cyclomatic_complexity_per_method":"7.25","cca_cyclomatic_complexity_total":"26693.00","code_duplication_ratio":"11782.00","code_duplication_total":"3.28","code_size":"133426.00","cyclomatic_complexity_adequacy":"21.00","cyclomatic_complexity_per_method":"7.43","cyclomatic_complexity_total":"27435.00","file_duplication_ratio":"12300","file_duplication_total":"12300","files_total":"629.00","folders_total":"426.00","huge_cca_cyclomatic_complexity_total":"148.00","huge_cyclomatic_complexity_ratio":"4.13","huge_cyclomatic_complexity_total":"167.00","huge_depth_ratio":"91546.00","huge_depth_total":"8.85","huge_folder_ratio":"12300","huge_folder_total":"12300","huge_headerfile_ratio":"12300","huge_headerfile_total":"12300","huge_method_ratio":"12300","huge_method_total":"12300","huge_non_headerfile_ratio":"12300","huge_non_headerfile_total":"12300","lines_per_file":"12300","lines_per_method":"8.04","maximum_cca_cyclomatic_complexity":"342.00","maximum_cyclomatic_complexity":"346.00","maximum_depth":"333.00","method_lines":"24.91","methods_total":"6840.00","non_hfile_code_duplication_ratio":"11782.00","non_hfile_code_duplication_total":"8.59","non_hfile_duplication_ratio":"12300","non_hfile_duplication_total":"12300","raw_lines":"182082.00","redundant_code_kloc":"674.00","redundant_code_total":"0.00","unsafe_functions_kloc":"0.00","unsafe_functions_total":"17.17","warning_suppression_kloc":"0.45","warning_suppression_total":"17.00"},"task_id":"435b58ecf7f54c45907c1384d01c94a6","task_name":"CSharp_02201119"}},"schema":{"$ref":"#/definitions/TaskMetricInfo"}},"400":{"description":"Bad Request","examples":{"application/json":{"error_code":"CC.00000000","error_msg":"网络繁忙,请稍后再试"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"401":{"description":"Unauthorized","examples":{"application/json":{"error_code":"CC.00000003","error_msg":"认证信息过期"}},"schema":{"$ref":"#/definitions/ErrorResponse"}}},"security":[{"apig-auth-iam":[]}],"summary":"查询cmertrics缺陷概要","tags":["缺陷管理"],"x-apigateway-backend":{"httpEndpoints":{"address":"10.63.38.190:40115","description":"","method":"GET","path":"/codecheck/v2/{project_id}/tasks/{task_id}/metrics-summary","scheme":"https","timeout":60000},"parameters":[{"description":"逻辑region","in":"HEADER","name":"X-AUTH-REGION","origin":"CONSTANT","value":"cn-north-7"}],"type":"HTTP"},"x-apigateway-cors":false,"x-apigateway-match-mode":"NORMAL","x-apigateway-request-type":"public","x-is-registered":"Y","x-name":"查询cmertrics缺陷概要","x-request-examples-1":"GET https://{endpoint}/v2/{project_id}/tasks/{task_id}/metrics-summary","x-request-examples-description-1":"","x-support-sdk":"Y","x-version":"v2"}}},"product_short":"CodeCheck","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":{"apig-auth-app":{"in":"header","name":"Authorization","type":"apiKey","x-apigateway-auth-type":"AppSigv1"},"apig-auth-app-optional":{"in":"header","name":"Authorization","type":"apiKey","x-apigateway-auth-opt":{"access-auth-type":"optional"},"x-apigateway-auth-type":"AppSigv1"},"apig-auth-iam":{"in":"header","name":"unused","type":"apiKey","x-apigateway-auth-type":"IAM"},"apig-auth-iam-none":{"in":"header","name":"unused","type":"apiKey","x-apigateway-auth-type":"IAM_NONE"}},"summary":"查询cmertrics缺陷概要","tags":"缺陷管理","uri":null,"version":"2.0"}