115 lines
2.6 KiB
YAML
115 lines
2.6 KiB
YAML
|
swagger: "2.0"
|
||
|
info:
|
||
|
title: beego Test API
|
||
|
description: |
|
||
|
beego has a very cool tools to autogenerate documents for your API
|
||
|
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
|
||
|
<br>
|
||
|
operationId: VersionController.GetAll
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
/workflow/:
|
||
|
post:
|
||
|
tags:
|
||
|
- workflow
|
||
|
description: |-
|
||
|
create workflows
|
||
|
<br>
|
||
|
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/{workflowId}:
|
||
|
get:
|
||
|
tags:
|
||
|
- workflow
|
||
|
description: |-
|
||
|
find workflow by workflowid
|
||
|
<br>
|
||
|
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
|
||
|
<br>
|
||
|
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
|
||
|
/workflow/find/{query}:
|
||
|
get:
|
||
|
tags:
|
||
|
- workflow
|
||
|
description: |-
|
||
|
find workflows with query
|
||
|
<br>
|
||
|
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: ""
|
||
|
definitions:
|
||
|
models.workflow:
|
||
|
title: workflow
|
||
|
type: object
|
||
|
tags:
|
||
|
- name: workflow
|
||
|
description: |
|
||
|
Operations about workflow
|
||
|
- name: version
|
||
|
description: |
|
||
|
VersionController operations for Version
|