100 lines
2.3 KiB
JSON
100 lines
2.3 KiB
JSON
|
|
{
|
||
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||
|
|
"title": "ResultDomain",
|
||
|
|
"description": "统一返回结果实体类",
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"code": {
|
||
|
|
"type": "integer",
|
||
|
|
"description": "状态码",
|
||
|
|
"example": 200
|
||
|
|
},
|
||
|
|
"message": {
|
||
|
|
"type": "string",
|
||
|
|
"description": "返回消息",
|
||
|
|
"example": "操作成功"
|
||
|
|
},
|
||
|
|
"success": {
|
||
|
|
"type": "boolean",
|
||
|
|
"description": "操作是否成功",
|
||
|
|
"example": true
|
||
|
|
},
|
||
|
|
"login": {
|
||
|
|
"type": "boolean",
|
||
|
|
"description": "是否登录",
|
||
|
|
"example": true
|
||
|
|
},
|
||
|
|
"auth": {
|
||
|
|
"type": "boolean",
|
||
|
|
"description": "是否有权限",
|
||
|
|
"example": true
|
||
|
|
},
|
||
|
|
"data": {
|
||
|
|
"description": "返回数据",
|
||
|
|
"example": null
|
||
|
|
},
|
||
|
|
"dataList": {
|
||
|
|
"type": "array",
|
||
|
|
"description": "返回数据列表",
|
||
|
|
"items": {},
|
||
|
|
"example": []
|
||
|
|
},
|
||
|
|
"pageParam": {
|
||
|
|
"$ref": "#/definitions/PageParam",
|
||
|
|
"description": "分页参数"
|
||
|
|
},
|
||
|
|
"pageDomain": {
|
||
|
|
"$ref": "#/definitions/PageDomain",
|
||
|
|
"description": "分页信息"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"required": ["code", "message", "success", "login", "auth"],
|
||
|
|
"definitions": {
|
||
|
|
"PageParam": {
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"pageNumber": {
|
||
|
|
"type": "integer",
|
||
|
|
"description": "当前页码",
|
||
|
|
"minimum": 1,
|
||
|
|
"example": 1
|
||
|
|
},
|
||
|
|
"pageSize": {
|
||
|
|
"type": "integer",
|
||
|
|
"description": "每页显示数量",
|
||
|
|
"minimum": 1,
|
||
|
|
"example": 10
|
||
|
|
},
|
||
|
|
"totalPages": {
|
||
|
|
"type": "integer",
|
||
|
|
"description": "总页数",
|
||
|
|
"minimum": 0,
|
||
|
|
"example": 5
|
||
|
|
},
|
||
|
|
"totalElements": {
|
||
|
|
"type": "integer",
|
||
|
|
"description": "总记录数",
|
||
|
|
"minimum": 0,
|
||
|
|
"example": 50
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"required": ["pageNumber", "pageSize", "totalPages", "totalElements"]
|
||
|
|
},
|
||
|
|
"PageDomain": {
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"pageParam": {
|
||
|
|
"$ref": "#/definitions/PageParam",
|
||
|
|
"description": "分页参数"
|
||
|
|
},
|
||
|
|
"dataList": {
|
||
|
|
"type": "array",
|
||
|
|
"description": "数据列表",
|
||
|
|
"items": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"required": ["pageParam", "dataList"]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|