approveflow/app/http/swagger/docs.go

377 lines
13 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Package swagger Code generated by swaggo/swag. DO NOT EDIT
package swagger
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"termsOfService": "https://github.com/swaggo/swag",
"contact": {
"name": "yejianfeng1",
"email": "yejianfeng"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/definition/query": {
"post": {
"description": "根据ID查询流程定义详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"flow-definition"
],
"summary": "查询单个流程定义",
"operationId": "flow-definition-query",
"parameters": [
{
"description": "查询详情请求参数",
"name": "DefinitionQueryParam",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/flow_definition.DefinitionQueryParam"
}
}
],
"responses": {
"200": {
"description": "返回成功的流程定义数据",
"schema": {
"allOf": [
{
"$ref": "#/definitions/base.Result"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/flow_definition.ApprovalFlowDTO"
}
}
}
]
}
},
"500": {
"description": "操作失败",
"schema": {
"$ref": "#/definitions/base.Result"
}
}
}
}
},
"/definition/query/list": {
"post": {
"description": "获取流程定义列表并支持分页",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"flow-definition"
],
"summary": "查询流程定义列表",
"operationId": "flow-definition-query-list",
"parameters": [
{
"description": "分页查询请求参数",
"name": "QueryListParam",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/flow_definition.QueryListParam"
}
}
],
"responses": {
"200": {
"description": "返回流程定义分页数据",
"schema": {
"allOf": [
{
"$ref": "#/definitions/base.Result"
},
{
"type": "object",
"properties": {
"data": {
"allOf": [
{
"$ref": "#/definitions/base.PageResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/flow_definition.ApprovalFlowDTO"
}
}
}
}
]
}
}
}
]
}
},
"500": {
"description": "操作失败",
"schema": {
"$ref": "#/definitions/base.Result"
}
}
}
}
},
"/definition/save": {
"post": {
"description": "创建一个新的流程定义",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"flow-definition"
],
"summary": "保存新的流程定义",
"operationId": "flow-definition-save",
"parameters": [
{
"description": "流程定义保存请求参数",
"name": "flowDefinitionSaveParam",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/flow_definition.flowDefinitionSaveParam"
}
}
],
"responses": {
"200": {
"description": "返回成功信息",
"schema": {
"$ref": "#/definitions/base.Result"
}
},
"500": {
"description": "操作失败",
"schema": {
"$ref": "#/definitions/base.Result"
}
}
}
}
},
"/definition/step/add": {
"post": {
"description": "根据传入的参数,添加步骤到指定的流程中",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"flow-definition"
],
"summary": "添加步骤到流程",
"operationId": "flow-definition-step-add",
"parameters": [
{
"description": "添加步骤请求参数",
"name": "stepAddParam",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/flow_definition.StepAddParam"
}
}
],
"responses": {
"200": {
"description": "操作成功",
"schema": {
"$ref": "#/definitions/base.Result"
}
},
"400": {
"description": "参数错误",
"schema": {
"$ref": "#/definitions/base.Result"
}
},
"500": {
"description": "操作失败",
"schema": {
"$ref": "#/definitions/base.Result"
}
}
}
}
}
},
"definitions": {
"base.PageResponse": {
"type": "object",
"properties": {
"current_page": {
"description": "当前页码",
"type": "integer"
},
"data": {
"description": "当前页的数据,可以是任意类型的切片"
},
"records_per_page": {
"description": "每页记录数",
"type": "integer"
},
"total_pages": {
"description": "总页数",
"type": "integer"
},
"total_records": {
"description": "总记录数",
"type": "integer"
}
}
},
"base.Result": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"data": {},
"message": {
"type": "string"
},
"success": {
"type": "boolean"
}
}
},
"flow_definition.ApprovalFlowDTO": {
"type": "object",
"properties": {
"description": {
"description": "流程描述",
"type": "string"
},
"id": {
"description": "主键ID",
"type": "integer"
},
"name": {
"description": "流程名称",
"type": "string"
}
}
},
"flow_definition.DefinitionQueryParam": {
"type": "object",
"properties": {
"id": {
"type": "integer"
}
}
},
"flow_definition.QueryListParam": {
"type": "object",
"properties": {
"page_number": {
"description": "当前页码,默认是第一页",
"type": "integer"
},
"page_size": {
"description": "每页记录数默认是10条",
"type": "integer"
}
}
},
"flow_definition.StepAddParam": {
"type": "object",
"properties": {
"flow_id": {
"type": "integer"
},
"from_step_key": {
"type": "string"
},
"step_code": {
"type": "string"
},
"to_step_key": {
"type": "string"
}
}
},
"flow_definition.flowDefinitionSaveParam": {
"type": "object",
"properties": {
"description": {
"description": "流程描述",
"type": "string"
},
"name": {
"description": "流程名称",
"type": "string"
}
}
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
},
"BasicAuth": {
"type": "basic"
}
},
"x-extension-openapi": {
"example": "value on a json format"
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.1",
Host: "",
BasePath: "/",
Schemes: []string{},
Title: "hade",
Description: "负责显示审批模块的接口",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}