227 lines
5.8 KiB
YAML
227 lines
5.8 KiB
YAML
basePath: /
|
||
definitions:
|
||
base.PageResponse:
|
||
properties:
|
||
current_page:
|
||
description: 当前页码
|
||
type: integer
|
||
data:
|
||
description: 当前页的数据,可以是任意类型的切片
|
||
records_per_page:
|
||
description: 每页记录数
|
||
type: integer
|
||
total_pages:
|
||
description: 总页数
|
||
type: integer
|
||
total_records:
|
||
description: 总记录数
|
||
type: integer
|
||
type: object
|
||
base.Result:
|
||
properties:
|
||
code:
|
||
type: integer
|
||
data: {}
|
||
message:
|
||
type: string
|
||
success:
|
||
type: boolean
|
||
type: object
|
||
flow_definition.ApprovalFlowDTO:
|
||
properties:
|
||
description:
|
||
description: 流程描述
|
||
type: string
|
||
id:
|
||
description: 主键ID
|
||
type: integer
|
||
name:
|
||
description: 流程名称
|
||
type: string
|
||
type: object
|
||
flow_definition.DefinitionQueryParam:
|
||
properties:
|
||
id:
|
||
type: integer
|
||
type: object
|
||
flow_definition.QueryListParam:
|
||
properties:
|
||
page_number:
|
||
description: 当前页码,默认是第一页
|
||
type: integer
|
||
page_size:
|
||
description: 每页记录数,默认是10条
|
||
type: integer
|
||
type: object
|
||
flow_definition.StepAddParam:
|
||
properties:
|
||
flow_id:
|
||
type: integer
|
||
from_step_key:
|
||
type: string
|
||
step_code:
|
||
type: string
|
||
to_step_key:
|
||
type: string
|
||
type: object
|
||
flow_definition.flowDefinitionSaveParam:
|
||
properties:
|
||
description:
|
||
description: 流程描述
|
||
type: string
|
||
name:
|
||
description: 流程名称
|
||
type: string
|
||
type: object
|
||
info:
|
||
contact:
|
||
email: yejianfeng
|
||
name: yejianfeng1
|
||
description: 负责显示审批模块的接口
|
||
license:
|
||
name: Apache 2.0
|
||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||
termsOfService: https://github.com/swaggo/swag
|
||
title: hade
|
||
version: "1.1"
|
||
paths:
|
||
/definition/query:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 根据ID查询流程定义详情
|
||
operationId: flow-definition-query
|
||
parameters:
|
||
- description: 查询详情请求参数
|
||
in: body
|
||
name: DefinitionQueryParam
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/flow_definition.DefinitionQueryParam'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: 返回成功的流程定义数据
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/definitions/base.Result'
|
||
- properties:
|
||
data:
|
||
$ref: '#/definitions/flow_definition.ApprovalFlowDTO'
|
||
type: object
|
||
"500":
|
||
description: 操作失败
|
||
schema:
|
||
$ref: '#/definitions/base.Result'
|
||
summary: 查询单个流程定义
|
||
tags:
|
||
- flow-definition
|
||
/definition/query/list:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 获取流程定义列表并支持分页
|
||
operationId: flow-definition-query-list
|
||
parameters:
|
||
- description: 分页查询请求参数
|
||
in: body
|
||
name: QueryListParam
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/flow_definition.QueryListParam'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: 返回流程定义分页数据
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/definitions/base.Result'
|
||
- properties:
|
||
data:
|
||
allOf:
|
||
- $ref: '#/definitions/base.PageResponse'
|
||
- properties:
|
||
data:
|
||
items:
|
||
$ref: '#/definitions/flow_definition.ApprovalFlowDTO'
|
||
type: array
|
||
type: object
|
||
type: object
|
||
"500":
|
||
description: 操作失败
|
||
schema:
|
||
$ref: '#/definitions/base.Result'
|
||
summary: 查询流程定义列表
|
||
tags:
|
||
- flow-definition
|
||
/definition/save:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 创建一个新的流程定义
|
||
operationId: flow-definition-save
|
||
parameters:
|
||
- description: 流程定义保存请求参数
|
||
in: body
|
||
name: flowDefinitionSaveParam
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/flow_definition.flowDefinitionSaveParam'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: 返回成功信息
|
||
schema:
|
||
$ref: '#/definitions/base.Result'
|
||
"500":
|
||
description: 操作失败
|
||
schema:
|
||
$ref: '#/definitions/base.Result'
|
||
summary: 保存新的流程定义
|
||
tags:
|
||
- flow-definition
|
||
/definition/step/add:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 根据传入的参数,添加步骤到指定的流程中
|
||
operationId: flow-definition-step-add
|
||
parameters:
|
||
- description: 添加步骤请求参数
|
||
in: body
|
||
name: stepAddParam
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/flow_definition.StepAddParam'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: 操作成功
|
||
schema:
|
||
$ref: '#/definitions/base.Result'
|
||
"400":
|
||
description: 参数错误
|
||
schema:
|
||
$ref: '#/definitions/base.Result'
|
||
"500":
|
||
description: 操作失败
|
||
schema:
|
||
$ref: '#/definitions/base.Result'
|
||
summary: 添加步骤到流程
|
||
tags:
|
||
- flow-definition
|
||
securityDefinitions:
|
||
ApiKeyAuth:
|
||
in: header
|
||
name: Authorization
|
||
type: apiKey
|
||
BasicAuth:
|
||
type: basic
|
||
swagger: "2.0"
|
||
x-extension-openapi:
|
||
example: value on a json format
|