【问题标题】:Is there any json schema like a excel table in Api Blueprint MSON?Api Blueprint MSON 中是否有类似 excel 表的 json 架构?
【发布时间】:2017-03-13 06:13:06
【问题描述】:

在 Api Blueprint MSON 中是否有类似 excel 表的 json 架构?

我正在几个客户端之间设计一些 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

【问题讨论】:

    标签: json jsonschema apiblueprint mson aglio


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2014-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-31
      • 2023-04-02
      • 2015-08-20
      相关资源
      最近更新 更多