Workin service

This commit is contained in:
mr
2024-07-24 10:25:08 +02:00
parent 6b34be6508
commit c9410552a2
16 changed files with 1235 additions and 285 deletions

View File

@@ -13,7 +13,7 @@
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"basePath": "/oc",
"basePath": "/oc/",
"paths": {
"/version/": {
"get": {
@@ -30,6 +30,18 @@
}
},
"/workflow/": {
"get": {
"tags": [
"workflow"
],
"description": "find workflow by workflowid\n\u003cbr\u003e",
"operationId": "WorkflowController.GetAll",
"responses": {
"200": {
"description": "{workflow} models.workflow"
}
}
},
"post": {
"tags": [
"workflow"
@@ -39,54 +51,168 @@
"parameters": [
{
"in": "body",
"name": "body",
"description": "The workflow content",
"name": "data",
"description": "body for data content (Json format)",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.workflow"
}
"$ref": "#/definitions/json"
}
}
],
"responses": {
"200": {
"description": "{string} models.workflow.Id"
},
"403": {
"description": "body is empty"
"description": "",
"schema": {
"$ref": "#/definitions/models.workflow"
}
}
}
}
},
"/workflow/find/{query}": {
"get": {
"/workflow/publish/{id}": {
"post": {
"tags": [
"workflow"
],
"description": "find workflows with query\n\u003cbr\u003e",
"operationId": "WorkflowController.Find",
"description": "create workflows\n\u003cbr\u003e",
"operationId": "WorkflowController.Publish",
"parameters": [
{
"in": "path",
"name": "query",
"description": "the keywords you need",
"name": "id",
"description": "the workflowid you want to get",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{workflows} []models.workflow"
},
"403": {
"description": ""
"description": "",
"schema": {
"$ref": "#/definitions/models.workflow"
}
}
}
}
},
"/workflow/{workflowId}": {
"/workflow/resource/": {
"get": {
"tags": [
"workflow/resource"
],
"description": "find workflow by workflowid\n\u003cbr\u003e",
"operationId": "WorkflowResourceController.GetAll",
"responses": {
"200": {
"description": "{workflow} models.workflow"
}
}
},
"post": {
"tags": [
"workflow/resource"
],
"description": "create workflows\n\u003cbr\u003e",
"operationId": "WorkflowResourceController.Create",
"parameters": [
{
"in": "body",
"name": "data",
"description": "body for data content (Json format)",
"required": true,
"schema": {
"$ref": "#/definitions/json"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/models.workflow"
}
}
}
}
},
"/workflow/resource/{id}": {
"get": {
"tags": [
"workflow/resource"
],
"description": "find workflows\n\u003cbr\u003e",
"operationId": "WorkflowResourceController.Get",
"parameters": [
{
"in": "path",
"name": "id",
"description": "the workflowid you want to get",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{workflow} models.workflow"
}
}
},
"put": {
"tags": [
"workflow/resource"
],
"description": "create workflows\n\u003cbr\u003e",
"operationId": "WorkflowResourceController.Update",
"parameters": [
{
"in": "path",
"name": "id",
"description": "the workflowid you want to get",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The workflow content",
"required": true,
"schema": {
"$ref": "#/definitions/models.workflow"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/models.workflow"
}
}
}
},
"delete": {
"tags": [
"workflow/resource"
],
"description": "delete the workflow\n\u003cbr\u003e",
"operationId": "WorkflowResourceController.Delete",
"parameters": [
{
"in": "path",
"name": "id",
"description": "The workflowId you want to delete",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{string} delete success!"
}
}
}
},
"/workflow/{id}": {
"get": {
"tags": [
"workflow"
@@ -96,7 +222,7 @@
"parameters": [
{
"in": "path",
"name": "workflowId",
"name": "id",
"description": "the workflowid you want to get",
"required": true,
"type": "string"
@@ -105,9 +231,39 @@
"responses": {
"200": {
"description": "{workflow} models.workflow"
}
}
},
"put": {
"tags": [
"workflow"
],
"description": "create workflows\n\u003cbr\u003e",
"operationId": "WorkflowController.Update",
"parameters": [
{
"in": "path",
"name": "id",
"description": "the workflowid you want to get",
"required": true,
"type": "string"
},
"403": {
"description": ":workflowId is empty"
{
"in": "body",
"name": "body",
"description": "The workflow content",
"required": true,
"schema": {
"$ref": "#/definitions/models.workflow"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/models.workflow"
}
}
}
},
@@ -120,7 +276,7 @@
"parameters": [
{
"in": "path",
"name": "workflowId",
"name": "id",
"description": "The workflowId you want to delete",
"required": true,
"type": "string"
@@ -129,15 +285,16 @@
"responses": {
"200": {
"description": "{string} delete success!"
},
"403": {
"description": "workflowId is empty"
}
}
}
}
},
"definitions": {
"json": {
"title": "json",
"type": "object"
},
"models.workflow": {
"title": "workflow",
"type": "object"
@@ -148,6 +305,10 @@
"name": "workflow",
"description": "Operations about workflow\n"
},
{
"name": "workflow/resource",
"description": "Operations about workflow\n"
},
{
"name": "version",
"description": "VersionController operations for Version\n"