Arrays 如何在Swagger(PowerApps)中捕获JSON数组值
在这方面我需要一些帮助,我想使用JSON一次性将批量记录传递给我的应用程序,但我在解析它时出错 运气好吗 这是我的JSON(它是从PowerApps转换成JSON的) ---------------Arrays 如何在Swagger(PowerApps)中捕获JSON数组值,arrays,json,swagger,Arrays,Json,Swagger,在这方面我需要一些帮助,我想使用JSON一次性将批量记录传递给我的应用程序,但我在解析它时出错 运气好吗 这是我的JSON(它是从PowerApps转换成JSON的) --------------- [ { "ItemId": "2HPB110X-V02", "TransferId": "TO-2008-000201" }, { "ItemId": "
[
{
"ItemId": "2HPB110X-V02",
"TransferId": "TO-2008-000201"
},
{
"ItemId": "2HPB85X-V02",
"TransferId": "TO-2008-000201"
},
{
"ItemId": "2HPB134X-V02",
"TransferId": "TO-2008-000201"
},
{
"ItemId": "2HPB134X-V02",
"TransferId": "TO-2008-000201"
}
]
/api/services/XXXXXServiceGroup/XXXXXService/TestBulkInsertList:
post:
responses:
'200':
description: Success
schema: {type: string, title: Message}
summary: TestBulkInsertList
operationId: TestBulkInsertList
parameters:
- {name: Content-Type, in: header, required: true, type: string, default: application/json}
- name: body
in: body
required: true
schema:
type: array
maxItems: 20
items: {$ref: '#/definitions/shipNowData'}
definitions:
shipNowData:
type: object
properties:
transferId: {type: string}
itemId: {type: string}
xml: {name: record}
parameters: {}
responses: {}
我的Web服务需要这样通过。(来自SWAGGER的预期输出)
这是我的招摇:
--------------------
[
{
"ItemId": "2HPB110X-V02",
"TransferId": "TO-2008-000201"
},
{
"ItemId": "2HPB85X-V02",
"TransferId": "TO-2008-000201"
},
{
"ItemId": "2HPB134X-V02",
"TransferId": "TO-2008-000201"
},
{
"ItemId": "2HPB134X-V02",
"TransferId": "TO-2008-000201"
}
]
/api/services/XXXXXServiceGroup/XXXXXService/TestBulkInsertList:
post:
responses:
'200':
description: Success
schema: {type: string, title: Message}
summary: TestBulkInsertList
operationId: TestBulkInsertList
parameters:
- {name: Content-Type, in: header, required: true, type: string, default: application/json}
- name: body
in: body
required: true
schema:
type: array
maxItems: 20
items: {$ref: '#/definitions/shipNowData'}
definitions:
shipNowData:
type: object
properties:
transferId: {type: string}
itemId: {type: string}
xml: {name: record}
parameters: {}
responses: {}
找到它:
/api/services/XXXXXServiceGroup/XXXXXService/TestBulkInsertList:
post:
responses:
'200':
description: Success
schema: {type: string, title: Message}
summary: TestBulkInsertList
operationId: TestBulkInsertList
parameters:
- {name: Content-Type, in: header, required: true, type: string, default: application/json}
- name: body
in: body
required: true
schema:
type: object
properties:
record:
type: array
items: {$ref: '#/definitions/shipNowData'}
description: TestBulkInsertList
definitions:
shipNowData:
type: object
properties:
transferId: {type: string}
itemId: {type: string}
xml: {name: record}
parameters: {}
responses: {}