115 lines
2.5 KiB
YAML
115 lines
2.5 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: ""
|
||
|
/auth/:
|
||
|
post:
|
||
|
tags:
|
||
|
- auth
|
||
|
description: |-
|
||
|
create auths
|
||
|
<br>
|
||
|
operationId: AuthController.Create
|
||
|
parameters:
|
||
|
- in: body
|
||
|
name: body
|
||
|
description: The auth content
|
||
|
required: true
|
||
|
schema:
|
||
|
type: array
|
||
|
items:
|
||
|
$ref: '#/definitions/models.auth'
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{string} models.auth.Id'
|
||
|
"403":
|
||
|
description: body is empty
|
||
|
/auth/{authId}:
|
||
|
get:
|
||
|
tags:
|
||
|
- auth
|
||
|
description: |-
|
||
|
find auth by authid
|
||
|
<br>
|
||
|
operationId: AuthController.Get
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: authId
|
||
|
description: the authid you want to get
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{auth} models.auth'
|
||
|
"403":
|
||
|
description: :authId is empty
|
||
|
delete:
|
||
|
tags:
|
||
|
- auth
|
||
|
description: |-
|
||
|
delete the auth
|
||
|
<br>
|
||
|
operationId: AuthController.Delete
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: authId
|
||
|
description: The authId you want to delete
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{string} delete success!'
|
||
|
"403":
|
||
|
description: authId is empty
|
||
|
/auth/find/{query}:
|
||
|
get:
|
||
|
tags:
|
||
|
- auth
|
||
|
description: |-
|
||
|
find auths with query
|
||
|
<br>
|
||
|
operationId: AuthController.Find
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: query
|
||
|
description: the keywords you need
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{auths} []models.auth'
|
||
|
"403":
|
||
|
description: ""
|
||
|
definitions:
|
||
|
models.auth:
|
||
|
title: auth
|
||
|
type: object
|
||
|
tags:
|
||
|
- name: auth
|
||
|
description: |
|
||
|
Operations about auth
|
||
|
- name: version
|
||
|
description: |
|
||
|
VersionController operations for Version
|