【发布时间】:2016-10-03 18:06:38
【问题描述】:
在我正在使用 YAML 编辑的招摇文档中。我打算使用 GFM 语法插入一个代码块,这是根据this document swagger 所期望的。
description: >-
Some description of the object here.
More Here. An example to for this is as follows:
```json
{
"Key": {
"name": "myName",
"id": 100
}
}
```
然而,这并没有显示为 JSON 格式,而是全部显示在一行中,如下所示:
Some description of the object here. More Here. An example to for this is as follows: ```json { "Key": { "name": "myName", "id": 100 } } ```
【问题讨论】:
-
在第一组三重反引号后尝试将
JSON(全部大写)作为您的语言标识符。json(小写)在 Github 上不是一种有效的语言,所以如果 Swagger 严格遵循这一点,这对你来说可能是个问题。