简体   繁体   English

如何在创建问题 rest api 中使用 Atlassian 文档格式

[英]How to use Atlassian Document Format in create issue rest api

I am trying to create an issue via Jira API -我正在尝试通过 Jira API 创建问题 -

{
    // other fields is here
    description: {
      type: "doc",
      version: 1,
      content: [
        {
          type: "text",
          text: summary
        }
     }
}

but I get an error - "Operation value must be a string".但我收到一个错误——“操作值必须是一个字符串”。

so how can I create an issue correctly?那么我该如何正确地创建问题呢?

Most likely you're using API version 2 - which accepts text for this field.您很可能正在使用 API 版本2 - 它接受此字段的文本

However, you're providing value as json ( Atlassian Document Format ) which is for API version 3但是,您提供的值是 API 版本3 jsonAtlassian 文档格式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM