feat: integrate Flowable manager approval workflow
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: AIOA API
|
||||
version: 0.3.0
|
||||
version: 0.4.0
|
||||
servers:
|
||||
- url: /api/v1
|
||||
paths:
|
||||
@@ -169,6 +169,67 @@ paths:
|
||||
$ref: "#/components/schemas/LeaveRequestEvent"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFound"
|
||||
/approval-tasks:
|
||||
get:
|
||||
operationId: listAssignedApprovalTasks
|
||||
summary: 查询分配给当前用户的审批待办
|
||||
responses:
|
||||
"200":
|
||||
description: 待办列表
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/ApprovalTask"
|
||||
/approval-tasks/{taskId}/approve:
|
||||
post:
|
||||
operationId: approveTask
|
||||
summary: 批准审批任务
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/ApprovalTaskId"
|
||||
- $ref: "#/components/parameters/IdempotencyKey"
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ApprovalDecision"
|
||||
responses:
|
||||
"200":
|
||||
description: 已批准或幂等重放
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/LeaveRequest"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFound"
|
||||
"409":
|
||||
$ref: "#/components/responses/Conflict"
|
||||
/approval-tasks/{taskId}/reject:
|
||||
post:
|
||||
operationId: rejectTask
|
||||
summary: 驳回审批任务
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/ApprovalTaskId"
|
||||
- $ref: "#/components/parameters/IdempotencyKey"
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ApprovalDecision"
|
||||
responses:
|
||||
"200":
|
||||
description: 已驳回或幂等重放
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/LeaveRequest"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFound"
|
||||
"409":
|
||||
$ref: "#/components/responses/Conflict"
|
||||
components:
|
||||
parameters:
|
||||
LeaveRequestId:
|
||||
@@ -184,6 +245,11 @@ components:
|
||||
type: string
|
||||
minLength: 16
|
||||
maxLength: 128
|
||||
ApprovalTaskId:
|
||||
name: taskId
|
||||
in: path
|
||||
required: true
|
||||
schema: { type: string }
|
||||
responses:
|
||||
BadRequest:
|
||||
description: 请求无效
|
||||
@@ -274,6 +340,10 @@ components:
|
||||
version: { type: integer, minimum: 0 }
|
||||
createdAt: { type: string, format: date-time }
|
||||
updatedAt: { type: string, format: date-time }
|
||||
processInstanceId:
|
||||
type: [string, "null"]
|
||||
processDefinitionId:
|
||||
type: [string, "null"]
|
||||
TransitionRequest:
|
||||
type: object
|
||||
required: [version]
|
||||
@@ -294,6 +364,23 @@ components:
|
||||
actorId: { type: string, format: uuid }
|
||||
traceId: { type: string }
|
||||
occurredAt: { type: string, format: date-time }
|
||||
ApprovalDecision:
|
||||
type: object
|
||||
required: [version]
|
||||
properties:
|
||||
version: { type: integer, format: int64, minimum: 0 }
|
||||
comment:
|
||||
type: [string, "null"]
|
||||
maxLength: 1000
|
||||
ApprovalTask:
|
||||
type: object
|
||||
required: [id, name, createdAt, leaveRequest]
|
||||
properties:
|
||||
id: { type: string }
|
||||
name: { type: string }
|
||||
createdAt: { type: string, format: date-time }
|
||||
leaveRequest:
|
||||
$ref: "#/components/schemas/LeaveRequest"
|
||||
Problem:
|
||||
type: object
|
||||
required: [type, title, status, code, traceId]
|
||||
|
||||
Reference in New Issue
Block a user