246 lines
5.7 KiB
YAML
246 lines
5.7 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/shared/
|
||
|
paths:
|
||
|
/version/:
|
||
|
get:
|
||
|
tags:
|
||
|
- version
|
||
|
description: |-
|
||
|
get version
|
||
|
<br>
|
||
|
operationId: VersionController.GetAll
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
/workspace/:
|
||
|
get:
|
||
|
tags:
|
||
|
- workspace
|
||
|
description: |-
|
||
|
find shared workspace by id
|
||
|
<br>
|
||
|
operationId: SharedWorkspaceController.GetAll
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{shared_workspace} models.shared_workspace'
|
||
|
post:
|
||
|
tags:
|
||
|
- workspace
|
||
|
description: |-
|
||
|
create shared workspace
|
||
|
<br>
|
||
|
operationId: SharedWorkspaceController.Create
|
||
|
parameters:
|
||
|
- in: body
|
||
|
name: data
|
||
|
description: body for data content (Json format)
|
||
|
required: true
|
||
|
schema:
|
||
|
$ref: '#/definitions/json'
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{shared workspace} models.shared_workspace'
|
||
|
/workspace/{id}:
|
||
|
get:
|
||
|
tags:
|
||
|
- workspace
|
||
|
description: |-
|
||
|
find shared workspace by id
|
||
|
<br>
|
||
|
operationId: SharedWorkspaceController.Get
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: the id you want to get
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{shared workspace} models.shared_workspace'
|
||
|
put:
|
||
|
tags:
|
||
|
- workspace
|
||
|
description: |-
|
||
|
create shared workspaces
|
||
|
<br>
|
||
|
operationId: SharedWorkspaceController.Update
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: the shared workspace id you want to get
|
||
|
required: true
|
||
|
type: string
|
||
|
- in: body
|
||
|
name: body
|
||
|
description: The shared workspace content
|
||
|
required: true
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.workspace'
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{shared workspace} models.shared_workspace'
|
||
|
delete:
|
||
|
tags:
|
||
|
- workspace
|
||
|
description: |-
|
||
|
delete the shared workspace
|
||
|
<br>
|
||
|
operationId: SharedWorkspaceController.Delete
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The id you want to delete
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{shared workspace} delete success!'
|
||
|
/workspace/rule/:
|
||
|
get:
|
||
|
tags:
|
||
|
- workspace/rule
|
||
|
description: |-
|
||
|
find rule by id
|
||
|
<br>
|
||
|
operationId: RuleController.GetAll
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{rule} models.rule'
|
||
|
post:
|
||
|
tags:
|
||
|
- workspace/rule
|
||
|
description: |-
|
||
|
create rule
|
||
|
<br>
|
||
|
operationId: RuleController.Create
|
||
|
parameters:
|
||
|
- in: body
|
||
|
name: data
|
||
|
description: body for data content (Json format)
|
||
|
required: true
|
||
|
schema:
|
||
|
$ref: '#/definitions/json'
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{rule} models.rule'
|
||
|
/workspace/rule/{id}:
|
||
|
get:
|
||
|
tags:
|
||
|
- workspace/rule
|
||
|
description: |-
|
||
|
find rule by id
|
||
|
<br>
|
||
|
operationId: RuleController.Get
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: the id you want to get
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{rule} models.rule'
|
||
|
put:
|
||
|
tags:
|
||
|
- workspace/rule
|
||
|
description: |-
|
||
|
create rules
|
||
|
<br>
|
||
|
operationId: RuleController.Update
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: the rule id you want to get
|
||
|
required: true
|
||
|
type: string
|
||
|
- in: body
|
||
|
name: body
|
||
|
description: The rule content
|
||
|
required: true
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.rule'
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{rule} models.rule'
|
||
|
delete:
|
||
|
tags:
|
||
|
- workspace/rule
|
||
|
description: |-
|
||
|
delete the rule
|
||
|
<br>
|
||
|
operationId: RuleController.Delete
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The id you want to delete
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{rule} delete success!'
|
||
|
/workspace/rule/search/{search}:
|
||
|
get:
|
||
|
tags:
|
||
|
- workspace/rule
|
||
|
description: |-
|
||
|
search rule
|
||
|
<br>
|
||
|
operationId: RuleController.Search
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: search
|
||
|
description: the word search you want to get
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{rule} models.rule'
|
||
|
/workspace/search/{search}:
|
||
|
get:
|
||
|
tags:
|
||
|
- workspace
|
||
|
description: |-
|
||
|
search shared workspace
|
||
|
<br>
|
||
|
operationId: SharedWorkspaceController.Search
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: search
|
||
|
description: the word search you want to get
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{shared workspace} models.shared_workspace'
|
||
|
definitions:
|
||
|
json:
|
||
|
title: json
|
||
|
type: object
|
||
|
models.rule:
|
||
|
title: rule
|
||
|
type: object
|
||
|
models.workspace:
|
||
|
title: workspace
|
||
|
type: object
|
||
|
tags:
|
||
|
- name: workspace
|
||
|
description: |
|
||
|
Operations about workspace
|
||
|
- name: workspace/rule
|
||
|
description: |
|
||
|
Operations about rule
|
||
|
- name: version
|
||
|
description: |
|
||
|
VersionController operations for Version
|