1
我們定義的資產爲:composer-rest-server REST API是否返回json響應中的嵌套對象?
asset PurchaseOrder identified by orderId {
o String orderId
--> SupplierChainParticipant createdBy
--> SupplierChainParticipant assignedTo
o String description
o String status
o Integer quantity
o String assetId
}
和參與者爲:
participant SupplierChainParticipant identified by participantId {
o String participantId
o String identity
o String type
}
現在,當我使用的作曲家,其餘服務器的REST API獲取資產的細節,我收到響應爲:
{
"orderId": "o5",
"createdBy": "resource:com.supplychain-network.SupplierChainParticipant#p1",
"assignedTo": "resource:com.supplychain-network.SupplierChainParticipant#p2",
"description": "New Engine",
"status": "created",
"quantity": 1,
"assetId": "a1"
}
作爲目前唯一返回的參數只有在獲取資產細節時,是否有辦法將參與者的細節與資產一起作爲Json r esponse?
作爲請求的一部分,我需要添加一個名爲「include」的字段並將其值設爲「resolve」? –
謝謝你丹:) –