multitenantStack/swagger/swagger.yml

629 lines
15 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:
/auth/login:
post:
tags:
- auth
description: create Auth
operationId: AuthController.Create
parameters:
- in: body
name: body
description: body for Auth content
required: true
schema:
$ref: '#/definitions/models.Auth'
responses:
"201":
description: ""
schema:
$ref: '#/definitions/models.Auth'
"403":
description: body is empty
/auth/register:
post:
tags:
- auth
description: create Auth
operationId: AuthController.Create
parameters:
- in: body
name: body
description: body for Auth content
required: true
schema:
$ref: '#/definitions/models.Auth'
responses:
"201":
description: ""
schema:
$ref: '#/definitions/models.Auth'
"403":
description: body is empty
/companydata/:
get:
tags:
- companydata
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:
- companydata
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
/companydata/{id}:
get:
tags:
- companydata
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:
- companydata
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:
- companydata
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
/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
/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
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
definitions:
models.Auth:
title: Auth
type: object
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: companydata
description: |
CompanyDataController operations for CompanyData
- name: post
description: |
PostController operations for Post
- name: user
description: |
CompanyUserController operations for CompanyUser
- name: auth
description: |
AuthController operations for Auth