huawei-cloud-api-definitions-CodeCheck 0.1.20240402

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"base_path":"/","components":null,"consumes":"","definitions":{"CustomAttributes":{"properties":{"attribute":{"description":"配置项属性,severity:为问题级别","example":"severity","type":"string"},"rules":{"description":"规则详细","items":{"$ref":"#/definitions/CustomAttributesRule"},"type":"array"}}},"CustomAttributesRule":{"properties":{"rule_config_list":{"description":"规则阈值详细","items":{"$ref":"#/definitions/RuleConfig"},"type":"array"},"rule_id":{"description":"规则ID","example":11712,"type":"string"},"value":{"description":"attribute的问题级别,0致命,1严重,2一般,3提示","example":2,"type":"string"}}},"ErrorResponse":{"properties":{"error_code":{"description":"错误码","example":"CC.00000000","type":"string"},"error_msg":{"description":"错误描述","example":"网络繁忙,请稍后再试","type":"string"}}},"RuleConfig":{"properties":{"default_value":{"description":"默认值","example":20,"type":"string"},"description":{"description":"描述","example":"代码复杂度超过阈值,则会被识别为超大圈复杂度,与圈复杂度统计区别在于统计SWITCH的时候,只统计SWITCH的个数,不统计case,default,必填","type":"string"},"id":{"description":"规则配置ID","example":251,"type":"integer"},"option_key":{"description":"当前规则配置项key","example":"threshold","type":"string"},"option_name":{"description":"当前规则配置项名称","example":"threshold","type":"string"},"option_value":{"description":"当前","example":10,"type":"string"},"rule_id":{"description":"规则ID","example":11707,"type":"integer"},"template_id":{"description":"规则集id","example":"99f573075fe24e769ad96c676511c823","type":"string"}}},"Ruleset":{"description":"创建规则集信息","properties":{"custom_attributes":{"description":"自定义规则参数项,支持修改规则阈值","items":{"$ref":"#/definitions/CustomAttributes"},"type":"array"},"is_default":{"description":"如果有基于的规则集则是1,没有基于的规则集则是0","example":"0","maxLength":1,"minLength":1,"type":"string"},"language":{"description":"规则集语言","example":"cpp","maxLength":128,"minLength":1,"type":"string"},"project_id":{"description":"项目ID","example":"24b97ef1e7a042fb912625b14c8e99f0","maxLength":50,"minLength":1,"type":"string"},"rule_ids":{"description":"新启用规则ids","example":"8139,8138","maxLength":4000,"minLength":1,"type":"string"},"template_id":{"description":"规则集ID","example":"da303d80d2594faca60dbcc2e29c18aa","maxLength":50,"minLength":1,"type":"string"},"template_name":{"description":"新规则集名称","example":"自定义test","maxLength":500,"minLength":1,"type":"string"},"uncheck_ids":{"description":"新关闭规则id","example":"1101,1102","maxLength":4000,"minLength":1,"type":"string"}},"required":["project_id","template_name","language","rule_ids","is_default"]},"RulesetRes":{"properties":{"template_id":{"description":"规则集ID","example":"9e16b*********9471ce5d","type":"string"}},"required":["template_id"]}},"description":null,"group_id":"6e24e1d8225c45beaaeeceee605429ba","host":"codecheck-ext.cn-north-4.myhuaweicloud.com","id":"9cf8babc0cfd471a82575e280f587c7c","info_version":"v2","method":"post","name":"CreateRuleset","parameters":{},"paths":{"/v2/ruleset":{"post":{"consumes":["application/json"],"deprecated":false,"description":"可根据需求灵活的组合规则。","operationId":"CreateRuleset","parameters":[{"description":"设置媒体类型和编码格式","in":"header","name":"Content-Type","required":true,"type":"string","x-example":"application/json;charset=UTF-8"},{"description":"用户Token\n\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":100000,"minLength":1,"name":"X-Auth-Token","required":true,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXX..."},{"description":"创建规则集信息","in":"body","name":"CreateRulesetRequestBody","required":true,"schema":{"$ref":"#/definitions/Ruleset"}}],"produces":["application/json"],"responses":{"201":{"description":"Request succeeded!","examples":{"application/json":{"template_id":"c53417a4804f45eba9c11991131c9e79"}},"schema":{"$ref":"#/definitions/RulesetRes"}},"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":"创建自定义规则集","tags":["规则管理"],"x-apigateway-backend":{"httpEndpoints":{"address":"10.63.38.190:40115","description":"","method":"POST","path":"/codecheck/v2/ruleset","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":"创建自定义规则集","x-request-examples-1":{"is_default":"1","language":"cpp","project_id":"24b97exxxxxxxxfb912625b14cxxxxxx","rule_ids":"8139,8138","template_id":"da303dxxxxxxxxaca60dbcc2e2xxxxxx","template_name":"test_cpp","uncheck_ids":"1101,1102"},"x-request-examples-description-1":"","x-request-examples-url-1":"POST https://{endpoint}/v2/ruleset","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":"创建自定义规则集","tags":"规则管理","uri":null,"version":"2.0"}