572 lines
14 KiB
YAML
572 lines
14 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: /v1
|
||
|
paths:
|
||
|
/company_data/:
|
||
|
get:
|
||
|
tags:
|
||
|
- company_data
|
||
|
description: get CompanyData
|
||
|
operationId: CompanyDataController.Get All
|
||
|
parameters:
|
||
|
- in: query
|
||
|
name: query
|
||
|
description: Filter. e.g. col1:v1,col2:v2 ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: fields
|
||
|
description: Fields returned. e.g. col1,col2 ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: sortby
|
||
|
description: Sorted-by fields. e.g. col1,col2 ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: order
|
||
|
description: Order corresponding to each sortby field, if single value, apply
|
||
|
to all sortby fields. e.g. desc,asc ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: limit
|
||
|
description: Limit the size of result set. Must be an integer
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: offset
|
||
|
description: Start position of result set. Must be an integer
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.CompanyData'
|
||
|
"403":
|
||
|
description: ""
|
||
|
post:
|
||
|
tags:
|
||
|
- company_data
|
||
|
description: create CompanyData
|
||
|
operationId: CompanyDataController.Post
|
||
|
parameters:
|
||
|
- in: body
|
||
|
name: body
|
||
|
description: body for CompanyData content
|
||
|
required: true
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.CompanyData'
|
||
|
responses:
|
||
|
"201":
|
||
|
description: '{int} models.CompanyData'
|
||
|
"403":
|
||
|
description: body is empty
|
||
|
/company_data/{id}:
|
||
|
get:
|
||
|
tags:
|
||
|
- company_data
|
||
|
description: get CompanyData by id
|
||
|
operationId: CompanyDataController.Get One
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The key for staticblock
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.CompanyData'
|
||
|
"403":
|
||
|
description: :id is empty
|
||
|
put:
|
||
|
tags:
|
||
|
- company_data
|
||
|
description: update the CompanyData
|
||
|
operationId: CompanyDataController.Put
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The id you want to update
|
||
|
required: true
|
||
|
type: string
|
||
|
- in: body
|
||
|
name: body
|
||
|
description: body for CompanyData content
|
||
|
required: true
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.CompanyData'
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.CompanyData'
|
||
|
"403":
|
||
|
description: :id is not int
|
||
|
delete:
|
||
|
tags:
|
||
|
- company_data
|
||
|
description: delete the CompanyData
|
||
|
operationId: CompanyDataController.Delete
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The id you want to delete
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{string} delete success!'
|
||
|
"403":
|
||
|
description: id is empty
|
||
|
/company_user/:
|
||
|
get:
|
||
|
tags:
|
||
|
- company_user
|
||
|
description: get CompanyUser
|
||
|
operationId: CompanyUserController.Get All
|
||
|
parameters:
|
||
|
- in: query
|
||
|
name: query
|
||
|
description: Filter. e.g. col1:v1,col2:v2 ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: fields
|
||
|
description: Fields returned. e.g. col1,col2 ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: sortby
|
||
|
description: Sorted-by fields. e.g. col1,col2 ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: order
|
||
|
description: Order corresponding to each sortby field, if single value, apply
|
||
|
to all sortby fields. e.g. desc,asc ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: limit
|
||
|
description: Limit the size of result set. Must be an integer
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: offset
|
||
|
description: Start position of result set. Must be an integer
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.CompanyUser'
|
||
|
"403":
|
||
|
description: ""
|
||
|
post:
|
||
|
tags:
|
||
|
- company_user
|
||
|
description: create CompanyUser
|
||
|
operationId: CompanyUserController.Post
|
||
|
parameters:
|
||
|
- in: body
|
||
|
name: body
|
||
|
description: body for CompanyUser content
|
||
|
required: true
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.CompanyUser'
|
||
|
responses:
|
||
|
"201":
|
||
|
description: '{int} models.CompanyUser'
|
||
|
"403":
|
||
|
description: body is empty
|
||
|
/company_user/{id}:
|
||
|
get:
|
||
|
tags:
|
||
|
- company_user
|
||
|
description: get CompanyUser by id
|
||
|
operationId: CompanyUserController.Get One
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The key for staticblock
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.CompanyUser'
|
||
|
"403":
|
||
|
description: :id is empty
|
||
|
put:
|
||
|
tags:
|
||
|
- company_user
|
||
|
description: update the CompanyUser
|
||
|
operationId: CompanyUserController.Put
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The id you want to update
|
||
|
required: true
|
||
|
type: string
|
||
|
- in: body
|
||
|
name: body
|
||
|
description: body for CompanyUser content
|
||
|
required: true
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.CompanyUser'
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.CompanyUser'
|
||
|
"403":
|
||
|
description: :id is not int
|
||
|
delete:
|
||
|
tags:
|
||
|
- company_user
|
||
|
description: delete the CompanyUser
|
||
|
operationId: CompanyUserController.Delete
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The id you want to delete
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{string} delete success!'
|
||
|
"403":
|
||
|
description: id is empty
|
||
|
/contact/:
|
||
|
get:
|
||
|
tags:
|
||
|
- contact
|
||
|
description: get Contact
|
||
|
operationId: ContactController.Get All
|
||
|
parameters:
|
||
|
- in: query
|
||
|
name: query
|
||
|
description: Filter. e.g. col1:v1,col2:v2 ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: fields
|
||
|
description: Fields returned. e.g. col1,col2 ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: sortby
|
||
|
description: Sorted-by fields. e.g. col1,col2 ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: order
|
||
|
description: Order corresponding to each sortby field, if single value, apply
|
||
|
to all sortby fields. e.g. desc,asc ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: limit
|
||
|
description: Limit the size of result set. Must be an integer
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: offset
|
||
|
description: Start position of result set. Must be an integer
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.Contact'
|
||
|
"403":
|
||
|
description: ""
|
||
|
post:
|
||
|
tags:
|
||
|
- contact
|
||
|
description: create Contact
|
||
|
operationId: ContactController.Post
|
||
|
parameters:
|
||
|
- in: body
|
||
|
name: body
|
||
|
description: body for Contact content
|
||
|
required: true
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.Contact'
|
||
|
responses:
|
||
|
"201":
|
||
|
description: '{int} models.Contact'
|
||
|
"403":
|
||
|
description: body is empty
|
||
|
/contact/{id}:
|
||
|
get:
|
||
|
tags:
|
||
|
- contact
|
||
|
description: get Contact by id
|
||
|
operationId: ContactController.Get One
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The key for staticblock
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.Contact'
|
||
|
"403":
|
||
|
description: :id is empty
|
||
|
put:
|
||
|
tags:
|
||
|
- contact
|
||
|
description: update the Contact
|
||
|
operationId: ContactController.Put
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The id you want to update
|
||
|
required: true
|
||
|
type: string
|
||
|
- in: body
|
||
|
name: body
|
||
|
description: body for Contact content
|
||
|
required: true
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.Contact'
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.Contact'
|
||
|
"403":
|
||
|
description: :id is not int
|
||
|
delete:
|
||
|
tags:
|
||
|
- contact
|
||
|
description: delete the Contact
|
||
|
operationId: ContactController.Delete
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The id you want to delete
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{string} delete success!'
|
||
|
"403":
|
||
|
description: id is empty
|
||
|
/post/:
|
||
|
get:
|
||
|
tags:
|
||
|
- post
|
||
|
description: get Post
|
||
|
operationId: PostController.Get All
|
||
|
parameters:
|
||
|
- in: query
|
||
|
name: query
|
||
|
description: Filter. e.g. col1:v1,col2:v2 ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: fields
|
||
|
description: Fields returned. e.g. col1,col2 ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: sortby
|
||
|
description: Sorted-by fields. e.g. col1,col2 ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: order
|
||
|
description: Order corresponding to each sortby field, if single value, apply
|
||
|
to all sortby fields. e.g. desc,asc ...
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: limit
|
||
|
description: Limit the size of result set. Must be an integer
|
||
|
type: string
|
||
|
- in: query
|
||
|
name: offset
|
||
|
description: Start position of result set. Must be an integer
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.Post'
|
||
|
"403":
|
||
|
description: ""
|
||
|
post:
|
||
|
tags:
|
||
|
- post
|
||
|
description: create Post
|
||
|
operationId: PostController.Post
|
||
|
parameters:
|
||
|
- in: body
|
||
|
name: body
|
||
|
description: body for Post content
|
||
|
required: true
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.Post'
|
||
|
responses:
|
||
|
"201":
|
||
|
description: '{int} models.Post'
|
||
|
"403":
|
||
|
description: body is empty
|
||
|
/post/{id}:
|
||
|
get:
|
||
|
tags:
|
||
|
- post
|
||
|
description: get Post by id
|
||
|
operationId: PostController.Get One
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The key for staticblock
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.Post'
|
||
|
"403":
|
||
|
description: :id is empty
|
||
|
put:
|
||
|
tags:
|
||
|
- post
|
||
|
description: update the Post
|
||
|
operationId: PostController.Put
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The id you want to update
|
||
|
required: true
|
||
|
type: string
|
||
|
- in: body
|
||
|
name: body
|
||
|
description: body for Post content
|
||
|
required: true
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.Post'
|
||
|
responses:
|
||
|
"200":
|
||
|
description: ""
|
||
|
schema:
|
||
|
$ref: '#/definitions/models.Post'
|
||
|
"403":
|
||
|
description: :id is not int
|
||
|
delete:
|
||
|
tags:
|
||
|
- post
|
||
|
description: delete the Post
|
||
|
operationId: PostController.Delete
|
||
|
parameters:
|
||
|
- in: path
|
||
|
name: id
|
||
|
description: The id you want to delete
|
||
|
required: true
|
||
|
type: string
|
||
|
responses:
|
||
|
"200":
|
||
|
description: '{string} delete success!'
|
||
|
"403":
|
||
|
description: id is empty
|
||
|
definitions:
|
||
|
models.CompanyData:
|
||
|
title: CompanyData
|
||
|
type: object
|
||
|
properties:
|
||
|
Created:
|
||
|
type: string
|
||
|
format: datetime
|
||
|
Data:
|
||
|
type: string
|
||
|
Id:
|
||
|
type: integer
|
||
|
format: int64
|
||
|
Key:
|
||
|
type: string
|
||
|
Modified:
|
||
|
type: string
|
||
|
format: datetime
|
||
|
Value:
|
||
|
type: string
|
||
|
models.CompanyUser:
|
||
|
title: CompanyUser
|
||
|
type: object
|
||
|
properties:
|
||
|
Created:
|
||
|
type: string
|
||
|
format: datetime
|
||
|
Id:
|
||
|
type: integer
|
||
|
format: int64
|
||
|
Modified:
|
||
|
type: string
|
||
|
format: datetime
|
||
|
Name:
|
||
|
type: string
|
||
|
Profile:
|
||
|
type: string
|
||
|
Role:
|
||
|
type: integer
|
||
|
format: int32
|
||
|
models.Contact:
|
||
|
title: Contact
|
||
|
type: object
|
||
|
properties:
|
||
|
Created:
|
||
|
type: string
|
||
|
format: datetime
|
||
|
Email:
|
||
|
type: string
|
||
|
FirstName:
|
||
|
type: string
|
||
|
Id:
|
||
|
type: integer
|
||
|
format: int64
|
||
|
LastContact:
|
||
|
type: string
|
||
|
format: datetime
|
||
|
LastName:
|
||
|
type: string
|
||
|
Meta:
|
||
|
type: string
|
||
|
Modified:
|
||
|
type: string
|
||
|
format: datetime
|
||
|
PhoneNumber:
|
||
|
type: string
|
||
|
models.Post:
|
||
|
title: Post
|
||
|
type: object
|
||
|
properties:
|
||
|
Created:
|
||
|
type: string
|
||
|
format: datetime
|
||
|
Data:
|
||
|
type: string
|
||
|
Id:
|
||
|
type: integer
|
||
|
format: int64
|
||
|
Meta:
|
||
|
type: string
|
||
|
Modified:
|
||
|
type: string
|
||
|
format: datetime
|
||
|
Name:
|
||
|
type: string
|
||
|
tags:
|
||
|
- name: contact
|
||
|
description: |
|
||
|
ContactController operations for Contact
|
||
|
- name: company_data
|
||
|
description: |
|
||
|
CompanyDataController operations for CompanyData
|
||
|
- name: post
|
||
|
description: |
|
||
|
PostController operations for Post
|
||
|
- name: company_user
|
||
|
description: |
|
||
|
CompanyUserController operations for CompanyUser
|