我可以使用 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 个项目,其中第一个项目是 deafult AppCommandArg
.
看起来不可能
让这个东西变成两个。如果您添加如图所示的元素,abowe Apiary 会按它看到的方式呈现它,如果一个元素记录了两次,则 json 架构也会描述它两次。