You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用API在TFS 2015创建Bug失败,提示请求补丁文档无效

JMeter调用TFS 2015 REST API创建Bug时提示无效补丁文档错误

我最近在尝试用JMeter工具通过REST API在TFS 2015中创建Bug,但一直卡着过不去,想问问有没有朋友碰到过类似问题?

我的请求配置细节如下:

  • 服务器地址:tfs2015.mycompany.com
  • 端口:8080
  • 请求路径:/tfs/SomePath/AnotherPath/_apis/wit/workitems/$Bug?api-version=2.0
  • 请求方法:PATCH
  • 请求体是严格按照TFS 2015官方文档给出的JSON补丁格式编写的(包含op、path、value字段的数组结构)

但每次发送请求都会收到如下错误响应:

{"$id":"1","innerException":null,"message":"You must pass a valid patch document in the body of the request.","typeName":"Microsoft.VisualStudio.Services.Common.VssPropertyValidationException, Microsoft.VisualStudio.Services.Common, Version=14.0.0.0, Culture=neutral, PublicKeyToken=token","typeKey":"VssPropertyValidationException","errorCode":0,"eventId":3000}

我反复核对了官方文档里的补丁示例,确认请求体的结构和字段都符合要求,但还是无法成功创建Bug。有没有人能帮我排查下可能的问题点?

内容的提问来源于stack exchange,提问作者TiredOfProgramming

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 10:07:16