【发布时间】:2017-11-08 13:04:31
【问题描述】:
我可以使用 MSON 来指定示例值而不是 + Body 吗?
是否可以覆盖预定义的结构值?
我试过这样:
+ Request (application/json)
+ Headers
Authorization: JWT <token>
+ Attributes (ClientsideCommand)
+ alias: `show-xc`
+ args (array[AppCommandArg], fixed-type)
+ (AppCommandArg)
+ arg_key: address
+ order: 1
+ required: true
+ skip_arg_name: true
+ (AppCommandArg)
+ arg_key: `-A1`
+ order: 2
+ required: true
+ skip_arg_name: false
但是这样的定义破坏了 json-schema,因为 AppCommandArg 被描述为单独的对象。
而且在从 MSON 生成的 JSON 中有 3 项,其中第一项是默认的 AppCommandArg。
【问题讨论】:
标签: jsonschema apiblueprint mson