143 lines
4.3 KiB
JSON
143 lines
4.3 KiB
JSON
{
|
||
"openapi": "3.0.1",
|
||
"info": {
|
||
"title": "打印相关接口",
|
||
"description": "print service methods",
|
||
"version": "1.0.0"
|
||
},
|
||
"paths": {
|
||
"/system": {
|
||
"post": {
|
||
"summary": "打印台相关接口",
|
||
"operationId": "printStationOperations",
|
||
"description": "根据method参数执行不同的打印台操作",
|
||
"parameters": [
|
||
{
|
||
"name": "method",
|
||
"in": "query",
|
||
"description": "调用方法名,如print.getList、print.getItem、print.updateItem、print.del、print.getComputer、print.getComputerPrinter、print.savePrinters",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"print.getList",
|
||
"print.getItem",
|
||
"print.updateItem",
|
||
"print.del",
|
||
"print.getComputer",
|
||
"print.getComputerPrinter",
|
||
"print.savePrinters"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"name": "v",
|
||
"in": "query",
|
||
"description": "版本号",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"example": "2.0"
|
||
}
|
||
},
|
||
{
|
||
"name": "timestamp",
|
||
"in": "query",
|
||
"description": "时间戳",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"example": "1646908800000"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": false,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"page": { "type": "integer", "example": 1 },
|
||
"pageSize": { "type": "integer", "example": 20 },
|
||
"where": {
|
||
"type": "object",
|
||
"example": { "name": "A台" }
|
||
},
|
||
"id": { "type": "integer", "example": 1 },
|
||
"name": { "type": "string", "example": "A台" },
|
||
"computer_id": { "type": "integer", "example": 2 },
|
||
"custom_barcode": { "type": "string", "example": "123456" },
|
||
"ids": {
|
||
"type": "array",
|
||
"items": { "type": "integer" },
|
||
"example": [1,2]
|
||
},
|
||
"default": { "type": "string", "example": "打印机名称" },
|
||
"express": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"express_id": { "type": "integer" },
|
||
"name": { "type": "string" }
|
||
}
|
||
},
|
||
"example": [{ "express_id": 1, "name": "顺丰" }]
|
||
},
|
||
"print_station_id": { "type": "integer", "example": 1 }
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功响应",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": { "type": "integer", "description": "状态码" },
|
||
"message": { "type": "string", "description": "返回信息" },
|
||
"data": { "type": "object", "description": "返回数据" }
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "错误请求",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": { "type": "integer" },
|
||
"message": { "type": "string" }
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权"
|
||
}
|
||
},
|
||
"security": [
|
||
{ "bearer": [] }
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"components": {
|
||
"securitySchemes": {
|
||
"bearer": {
|
||
"type": "http",
|
||
"scheme": "bearer",
|
||
"bearerFormat": "JWT"
|
||
}
|
||
}
|
||
}
|
||
} |