如何在 api-blueprint 中创建对象字段?
How to create object field in api-blueprint?
我正在尝试使用一个对象字段和一个预定义字段来记录 POST 请求。我怎样才能正确地做到这一点?此解决方案在 api-蓝图解析后破坏了架构。
### Create order [POST]
Create a new order
+ Request Post new patient (application/json)
+ Attributes (object)
### CustomIds
+ system: `['Some1', 'Some2']` (string, optional) - The order custom id's system
+ Members
+ `Test1`
+ `Test2`
+ `Test3`
+ customerName: `John` (string, required) - The customer's given name
+ customIds: `some, 123` (array[CustomIds], optional) - custom ids
+ Body
{
"customerName" : "John",
"customIds": [{"system": "some", "id": "123"}] //optional
}
### Create order [POST]
Create a new order
+ Request Post new order (application/json)
+ Attributes (object)
+ customIds (object)
+ id: `12345` (string, optional) - The order custom id
+ system: `Some` (enum[string], optional) - The order custom id's system name
+ Members
+ `Some1`
+ `Some2`
+ `Some3`
+ customerName: `John` (string, required) - The customer's given name
+ Body
{
"customerName" : "John",
"customIds": [{"system": "some", "id": "123"}] //optional
}
我正在尝试使用一个对象字段和一个预定义字段来记录 POST 请求。我怎样才能正确地做到这一点?此解决方案在 api-蓝图解析后破坏了架构。
### Create order [POST]
Create a new order
+ Request Post new patient (application/json)
+ Attributes (object)
### CustomIds
+ system: `['Some1', 'Some2']` (string, optional) - The order custom id's system
+ Members
+ `Test1`
+ `Test2`
+ `Test3`
+ customerName: `John` (string, required) - The customer's given name
+ customIds: `some, 123` (array[CustomIds], optional) - custom ids
+ Body
{
"customerName" : "John",
"customIds": [{"system": "some", "id": "123"}] //optional
}
### Create order [POST]
Create a new order
+ Request Post new order (application/json)
+ Attributes (object)
+ customIds (object)
+ id: `12345` (string, optional) - The order custom id
+ system: `Some` (enum[string], optional) - The order custom id's system name
+ Members
+ `Some1`
+ `Some2`
+ `Some3`
+ customerName: `John` (string, required) - The customer's given name
+ Body
{
"customerName" : "John",
"customIds": [{"system": "some", "id": "123"}] //optional
}