欢迎来到Cat2Bug欢迎来到Cat2Bug
首页
  • Cat2Bug-Platform
  • Cat2Bug-Platform
  • GitHub
  • Gitee
  • 简体中文
  • English
首页
  • Cat2Bug-Platform
  • Cat2Bug-Platform
  • GitHub
  • Gitee
  • 简体中文
  • English
  • 指南

    • 介绍
    • 在线体验
    • 编译程序
    • 系统部署
    • 如何升级
  • 功能

    • 成员
    • 团队
    • 项目
    • 交付物
    • 测试用例
    • 缺陷
    • 报告
    • 文档
    • 通知
  • API接口

    • API介绍
    • 缺陷接口
    • 报告接口

缺陷接口

创建缺陷

提示

此接口在Cat2Bug-Platform 0.3.0中已废弃,提交缺陷请转到报告接口

  • 接口路径: /api/defect

  • 方法: POST

  • 请求参数

{
    "defectType":1,
    "defectName":"登陆账号长度没有限制",
    "defectDescribe":"账号长度应设置最大32位,目前输入33位依然可以提交通过",
    "defectLevel":2
}

请求参数说明

参数类型范围说明
defectType数值型必填,BUG(错误)、TASK(任务)、DEMAND(需求)缺陷类型
defectName字符型必填,1至128位字节缺陷名称
defectDescribe字符型必填,1至65536位字节缺陷描述
defectLevel数值型必填,1至5缺陷等级
  • 返回值
{
    {
        "msg":"操作成功",
        "code":200,
        "data":{
            "createBy":"robot",
            "createTime":"2024-02-18 01:13:34",
            "updateBy":"robot",
            "updateTime":"2024-02-18 01:13:34",
            "defectNumber":16,
            "defectType":"TASK",
            "defectName":"登陆账号长度没有限制",
            "defectDescribe":"账号长度应设置最大32位,目前输入33位依然可以提交通过",
            "annexList":null,
            "imgList":null,
            "project":"Cat2Bug-Platform",
            "module":"Cat2Bug-Platform\登陆",
            "moduleVersion":"0.5.1",
            "defectState":"PROCESSING",
            "defectLevel":"2",
        }
    }
}

返回值说明

参数类型范围说明
createBy字符型创建成员名
createTime字符型创建时间
updateBy字符型更新成员名
updateTime字符型更新时间
defectNumber数值型缺陷编号,同一项目中的编号不能重复
defectType字符型BUG(错误)、TASK(任务)、DEMAND(需求)缺陷类型
defectName字符型1至128位字节缺陷描述
defectDescribe字符型1至65536位字节缺陷描述
annexList字符型附件路径数组
imgList字符型图片路径数组
project字符型所属项目名
deliverable字符型交付物名称
deliverableVersion字符型交付物版本
defectState字符型PROCESSING(待处理)、AUDIT(待审核)、RESOLVED(已解决)、REJECTED(已驳回)、CLOSED(已关闭)缺陷状态
defectLevel数值型缺陷等级
  • 示例
curl --location -X POST 'http://localhost:2020/api/defect' \
-H 'Content-Type: application/json' \
-H 'CAT2BUG-API-KEY: 202402110748485l2ug97j471ul9wq' \
-d '{"defectType": 1, "defectName":"defectName", "defectDescribe":"defectDescribe", "defectLevel":2 }'

提示

请更换示例中的接口IP、端口和CAT2BUG-API-KEY密钥

Last Updated:
Contributors: yuzhantao
Prev
API介绍
Next
报告接口