【问题标题】:How to specify an example for an object type in api-blueprint如何在 api-blueprint 中为对象类型指定示例
【发布时间】:2016-12-16 09:31:06
【问题描述】:

是否可以在以下数据结构中为 Baz 类型的“bar”指定示例值?

# Data Structures
## Foo (object)
   + arg0 (number, required) - the arg0
   + arg1 (number, optional) - the arg1
   + arg2: a, b, c (enum, required) - the arg2

## Baz (object)
  + bar (Foo, required)

提前致谢

--乌尔里希

【问题讨论】:

    标签: apiblueprint


    【解决方案1】:

    您应该能够通过指定复杂对象的每个属性来提供示例,如下所示:

    + bar (Foo, required)
        + Sample
            + (object)
                + arg0: 1
                + arg1: 2
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-12
      • 2016-07-06
      • 2013-01-15
      • 1970-01-01
      相关资源
      最近更新 更多