如何在 Apiary.io 中显示嵌套属性定义
How To Show Nested Attribute Definition In Apiary.io
我有一个数据结构定义如下:
# Data Structures
## PlayerRank (object)
Represents the minimum amount of data the the client needs to send to give rank information about a particular Player in a particular Played Game.
+ playerId (number, required) - NemeStats unique identifier for the Player.
+ gameRank (number, required) - The corresponding rank of the Player in this Played Game. A rank of 1 means the Player got first place, 2 means second place, and so on.
+ pointsScored (number, optional) - Integer number of points the Player scored in the Played Game.
我正在尝试在另一个操作定义中使用此数据结构,如下所示:
## Create a new Played Game [POST]
This service will record a new Played Game.
+ Attributes
+ gameDefinitionId (number, required) - NemeStats unique identifier for the Game Definition (e.g. Race For the Galaxy's unique Id) of the Played Game.
+ datePlayed (string, optional) - The date the game was played in yyyy-MM-dd format (e.g. 2015-04-29).
+ notes (string, optional) - Any notes or comments that the User wants to record about the game for future reference.
+ playerRanks (array[PlayerRank], required) - A collection of PlayerRank objects specifying the game rank and points scored for each Player. See below table for details.
我希望 Apiary.io 文档不仅显示顶级属性的定义,还显示 PlayerRank 对象的定义。作为一名试图理解 UI 的开发人员,我想查看每个对象和字段的定义,以便我知道如何正确地形成请求。现在它只给出了 playerRanks 对象的描述:"A collection of PlayerRank objects specifying the game rank and points scored for each Player." 但它没有扩展定义来显示 PlayerRank 数据结构的所有属性。
知道 Apiary.io 文档是否可以促进这一点吗?
据我所知,这是一个测试版功能,UI 尚未完成,请参阅 this github issue 了解更多信息和对光明未来的预览。
现在 Apiary,API 蓝图支持嵌套对象,您可以如下定义
+ Attributes (object)
+ name: iPhone 6 / 6s (string, required) - Offer Name
+ price: 10.4 (number) - Offer price
can be a number with 2 decimal places, this is the sale price
+ offer_options (object)
+ option_name: black (string, required) - offer option name
+ max_qty: 0 (number) - Purchase limit to this quantity
我有一个数据结构定义如下:
# Data Structures
## PlayerRank (object)
Represents the minimum amount of data the the client needs to send to give rank information about a particular Player in a particular Played Game.
+ playerId (number, required) - NemeStats unique identifier for the Player.
+ gameRank (number, required) - The corresponding rank of the Player in this Played Game. A rank of 1 means the Player got first place, 2 means second place, and so on.
+ pointsScored (number, optional) - Integer number of points the Player scored in the Played Game.
我正在尝试在另一个操作定义中使用此数据结构,如下所示:
## Create a new Played Game [POST]
This service will record a new Played Game.
+ Attributes
+ gameDefinitionId (number, required) - NemeStats unique identifier for the Game Definition (e.g. Race For the Galaxy's unique Id) of the Played Game.
+ datePlayed (string, optional) - The date the game was played in yyyy-MM-dd format (e.g. 2015-04-29).
+ notes (string, optional) - Any notes or comments that the User wants to record about the game for future reference.
+ playerRanks (array[PlayerRank], required) - A collection of PlayerRank objects specifying the game rank and points scored for each Player. See below table for details.
我希望 Apiary.io 文档不仅显示顶级属性的定义,还显示 PlayerRank 对象的定义。作为一名试图理解 UI 的开发人员,我想查看每个对象和字段的定义,以便我知道如何正确地形成请求。现在它只给出了 playerRanks 对象的描述:"A collection of PlayerRank objects specifying the game rank and points scored for each Player." 但它没有扩展定义来显示 PlayerRank 数据结构的所有属性。
知道 Apiary.io 文档是否可以促进这一点吗?
据我所知,这是一个测试版功能,UI 尚未完成,请参阅 this github issue 了解更多信息和对光明未来的预览。
现在 Apiary,API 蓝图支持嵌套对象,您可以如下定义
+ Attributes (object)
+ name: iPhone 6 / 6s (string, required) - Offer Name
+ price: 10.4 (number) - Offer price
can be a number with 2 decimal places, this is the sale price
+ offer_options (object)
+ option_name: black (string, required) - offer option name
+ max_qty: 0 (number) - Purchase limit to this quantity