我正在尝试在 Swagger 编辑器中获取多行文字(顺便说一句,很棒的工具!)。
post:
summary: Translate one or more identifiers
description: |
Translate one or more identifiers for one entity into the
identifiers of another entity. Translate one or more
identifiers for one entity into the identifiers of another entity.
consumes:
- application/json
我试过 | 和 >,具有不同的结尾(增加缩进与空行),以及我能想到的各种方式,但它总是给出相同的错误:
YAML Syntax Error
Can not read a block mapping entry; a multiline key may not be an implicit
key at line 24, column 15: consumes: ^
我看到 JS-YAML 的错误表明问题是最后的 Windows 样式换行符,我知道 HTML textareas 可以创建它。这是我第一次真正大量使用 YAML,是我做错了什么,还是 Swagger 编辑器中的错误?