oc-peer/swagger/swagger.json
2024-07-11 11:40:11 +02:00

156 lines
4.9 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "beego Test API",
"description": "beego has a very cool tools to autogenerate documents for your API\n",
"version": "1.0.0",
"termsOfService": "http://beego.me/",
"contact": {
"email": "astaxie@gmail.com"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"basePath": "/oc",
"paths": {
"/version/": {
"get": {
"tags": [
"version"
],
"description": "get version\n\u003cbr\u003e",
"operationId": "VersionController.GetAll",
"responses": {
"200": {
"description": ""
}
}
}
},
"/workflow/": {
"post": {
"tags": [
"workflow"
],
"description": "create workflows\n\u003cbr\u003e",
"operationId": "WorkflowController.Create",
"parameters": [
{
"in": "body",
"name": "body",
"description": "The workflow content",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.workflow"
}
}
}
],
"responses": {
"200": {
"description": "{string} models.workflow.Id"
},
"403": {
"description": "body is empty"
}
}
}
},
"/workflow/find/{query}": {
"get": {
"tags": [
"workflow"
],
"description": "find workflows with query\n\u003cbr\u003e",
"operationId": "WorkflowController.Find",
"parameters": [
{
"in": "path",
"name": "query",
"description": "the keywords you need",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{workflows} []models.workflow"
},
"403": {
"description": ""
}
}
}
},
"/workflow/{workflowId}": {
"get": {
"tags": [
"workflow"
],
"description": "find workflow by workflowid\n\u003cbr\u003e",
"operationId": "WorkflowController.Get",
"parameters": [
{
"in": "path",
"name": "workflowId",
"description": "the workflowid you want to get",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{workflow} models.workflow"
},
"403": {
"description": ":workflowId is empty"
}
}
},
"delete": {
"tags": [
"workflow"
],
"description": "delete the workflow\n\u003cbr\u003e",
"operationId": "WorkflowController.Delete",
"parameters": [
{
"in": "path",
"name": "workflowId",
"description": "The workflowId you want to delete",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{string} delete success!"
},
"403": {
"description": "workflowId is empty"
}
}
}
}
},
"definitions": {
"models.workflow": {
"title": "workflow",
"type": "object"
}
},
"tags": [
{
"name": "workflow",
"description": "Operations about workflow\n"
},
{
"name": "version",
"description": "VersionController operations for Version\n"
}
]
}