multitenantStack/swagger/swagger.yml

629 lines
15 KiB
YAML
Raw Normal View History

2018-11-06 11:31:49 +00:00
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:
2018-11-13 18:03:26 +00:00
/auth/login:
post:
2018-11-06 11:31:49 +00:00
tags:
2018-11-07 10:10:51 +00:00
- auth
2018-11-13 18:03:26 +00:00
description: create Auth
operationId: AuthController.Create
2018-11-06 11:31:49 +00:00
parameters:
- in: body
name: body
2018-11-07 10:10:51 +00:00
description: body for Auth content
2018-11-06 11:31:49 +00:00
required: true
schema:
2018-11-13 18:03:26 +00:00
$ref: '#/definitions/models.Auth'
2018-11-06 11:31:49 +00:00
responses:
2018-11-13 18:03:26 +00:00
"201":
2018-11-06 11:31:49 +00:00
description: ""
schema:
2018-11-13 18:03:26 +00:00
$ref: '#/definitions/models.Auth'
2018-11-06 11:31:49 +00:00
"403":
2018-11-13 18:03:26 +00:00
description: body is empty
/auth/register:
2018-11-07 10:10:51 +00:00
post:
tags:
- auth
description: create Auth
operationId: AuthController.Create
parameters:
- in: body
name: body
description: body for Auth content
required: true
schema:
2018-11-13 18:03:26 +00:00
$ref: '#/definitions/models.Auth'
2018-11-07 10:10:51 +00:00
responses:
"201":
description: ""
schema:
2018-11-13 18:03:26 +00:00
$ref: '#/definitions/models.Auth'
2018-11-07 10:10:51 +00:00
"403":
description: body is empty
/companydata/:
2018-11-06 11:31:49 +00:00
get:
tags:
2018-11-07 10:10:51 +00:00
- companydata
description: get CompanyData
operationId: CompanyDataController.Get All
2018-11-06 11:31:49 +00:00
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:
2018-11-07 10:10:51 +00:00
$ref: '#/definitions/models.CompanyData'
2018-11-06 11:31:49 +00:00
"403":
description: ""
post:
tags:
2018-11-07 10:10:51 +00:00
- companydata
description: create CompanyData
operationId: CompanyDataController.Post
2018-11-06 11:31:49 +00:00
parameters:
- in: body
name: body
2018-11-07 10:10:51 +00:00
description: body for CompanyData content
2018-11-06 11:31:49 +00:00
required: true
schema:
2018-11-07 10:10:51 +00:00
$ref: '#/definitions/models.CompanyData'
2018-11-06 11:31:49 +00:00
responses:
"201":
2018-11-07 10:10:51 +00:00
description: '{int} models.CompanyData'
2018-11-06 11:31:49 +00:00
"403":
description: body is empty
2018-11-07 10:10:51 +00:00
/companydata/{id}:
2018-11-06 11:31:49 +00:00
get:
tags:
2018-11-07 10:10:51 +00:00
- companydata
description: get CompanyData by id
operationId: CompanyDataController.Get One
2018-11-06 11:31:49 +00:00
parameters:
- in: path
name: id
description: The key for staticblock
required: true
type: string
responses:
"200":
description: ""
schema:
2018-11-07 10:10:51 +00:00
$ref: '#/definitions/models.CompanyData'
2018-11-06 11:31:49 +00:00
"403":
description: :id is empty
put:
tags:
2018-11-07 10:10:51 +00:00
- companydata
description: update the CompanyData
operationId: CompanyDataController.Put
2018-11-06 11:31:49 +00:00
parameters:
- in: path
name: id
description: The id you want to update
required: true
type: string
- in: body
name: body
2018-11-07 10:10:51 +00:00
description: body for CompanyData content
2018-11-06 11:31:49 +00:00
required: true
schema:
2018-11-07 10:10:51 +00:00
$ref: '#/definitions/models.CompanyData'
2018-11-06 11:31:49 +00:00
responses:
"200":
description: ""
schema:
2018-11-07 10:10:51 +00:00
$ref: '#/definitions/models.CompanyData'
2018-11-06 11:31:49 +00:00
"403":
description: :id is not int
delete:
tags:
2018-11-07 10:10:51 +00:00
- companydata
description: delete the CompanyData
operationId: CompanyDataController.Delete
2018-11-06 11:31:49 +00:00
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
2018-11-07 10:10:51 +00:00
/user/:
get:
tags:
- 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:
- user
description: Create a new CompanyUser and his user company mapping
2018-11-07 10:10:51 +00:00
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
/user/{id}:
get:
tags:
- 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:
- 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:
- 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
/user/deletecompany:
delete:
tags:
- user
description: Delete the entire Company
operationId: CompanyUserController.Delete Company
responses:
"200":
description: '{string} delete success!'
"403":
description: failed
2018-11-06 11:31:49 +00:00
definitions:
2018-11-13 18:03:26 +00:00
models.Auth:
title: Auth
2018-11-07 10:10:51 +00:00
type: object
2018-11-06 11:31:49 +00:00
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
2018-11-07 10:10:51 +00:00
- name: companydata
2018-11-06 11:31:49 +00:00
description: |
CompanyDataController operations for CompanyData
- name: post
description: |
PostController operations for Post
2018-11-07 10:10:51 +00:00
- name: user
2018-11-06 11:31:49 +00:00
description: |
CompanyUserController operations for CompanyUser
2018-11-07 10:10:51 +00:00
- name: auth
description: |
AuthController operations for Auth