在使用JSON时,如何在Swagger中编写描述时如何创建新段落?
我只找到YAML的示例,当我像Markdown一样创建一个新段落时,验证失败,文档不再渲染。
我想要什么
第一段描述了这个电话。
另一段提供了有关通话的其他信息。
我尝试过但不起作用
"description": "The first paragraph describes the call.
Another paragraph gives additional information about the call.",
答案 0 :(得分:2)
JSON不支持文字多行字符串。
用\n
替换换行符应该有用,例如:
"description": "The first paragraph describes the call.\n\nAnother paragraph gives additional information about the call.",