0

Api Blueprint MSON 中是否有任何 json 模式,例如 excel 表?

我正在几个客户之间设计一些api。所以我需要能够呈现为易于阅读的格式的 api 文档工具。我搜索这 3 个解决方案。(Swagger、RAML、Api 蓝图)。我决定使用 Api Blueprint 是因为它可以通过 markdown 呈现更丰富的形式。Api Blueprint 中的几乎所有功能都让我满意。但是 json 模式格式非常复杂且难以阅读。我希望我的结果 html 最终如下所示。(我使用 aglio 作为 Api Blueprint html 渲染器。)

这是我的apib源代码

FORMAT: 1A



# GET /MyApi

- Request
    - Attributes
        - name : hhd (string, required) - this is person name
        - age : 37 (number, optional) - this is person age
        - pets (array)
            - (object)
                - name : tom (string, optional) - this is pet's name
                - type : dog (string, required) - this is pet's type
            - (object)
                - name : jane
                - type : cat


- Response 200
    - Attributes
        - status : ok (string, required)
        - id : 1000 (number, required)
        - name : hhd (string, required) - this is person name
        - age : 37 (number, optional) - this is person age
        - pets : (array)
            - (object)
                - id : 10001 (number, required)
                - name : tom (string, optional) - this is pet's name
                - type : dog (string, required) - this is pet's type
            - (object)
                - id : 10002
                - name : jane
                - type : cat
4

1 回答 1

1

Aglio 目前不支持此功能。您可以编写自定义主题布局或主题引擎来支持这一点。

于 2017-03-22T18:30:22.373 回答