Moving files and adding auth

This commit is contained in:
2018-11-07 11:10:51 +01:00
parent 728ac72dff
commit 1c16b54802
19 changed files with 1175 additions and 309 deletions

View File

@ -15,10 +15,188 @@
},
"basePath": "/v1",
"paths": {
"/company_data/": {
"/auth/": {
"get": {
"tags": [
"company_data"
"auth"
],
"description": "get Auth",
"operationId": "AuthController.GetAll",
"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/.Auth"
}
},
"403": {
"description": ""
}
}
}
},
"/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/.Auth"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/.Auth"
}
},
"403": {
"description": "body is empty"
}
}
}
},
"/auth/{id}": {
"get": {
"tags": [
"auth"
],
"description": "get Auth by id",
"operationId": "AuthController.GetOne",
"parameters": [
{
"in": "path",
"name": "id",
"description": "The key for staticblock",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/.Auth"
}
},
"403": {
"description": ":id is empty"
}
}
},
"put": {
"tags": [
"auth"
],
"description": "update the Auth",
"operationId": "AuthController.Put",
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id you want to update",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "body for Auth content",
"required": true,
"schema": {
"$ref": "#/definitions/.Auth"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/.Auth"
}
},
"403": {
"description": ":id is not int"
}
}
},
"delete": {
"tags": [
"auth"
],
"description": "delete the Auth",
"operationId": "AuthController.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"
}
}
}
},
"/companydata/": {
"get": {
"tags": [
"companydata"
],
"description": "get CompanyData",
"operationId": "CompanyDataController.Get All",
@ -74,7 +252,7 @@
},
"post": {
"tags": [
"company_data"
"companydata"
],
"description": "create CompanyData",
"operationId": "CompanyDataController.Post",
@ -99,10 +277,10 @@
}
}
},
"/company_data/{id}": {
"/companydata/{id}": {
"get": {
"tags": [
"company_data"
"companydata"
],
"description": "get CompanyData by id",
"operationId": "CompanyDataController.Get One",
@ -129,7 +307,7 @@
},
"put": {
"tags": [
"company_data"
"companydata"
],
"description": "update the CompanyData",
"operationId": "CompanyDataController.Put",
@ -165,7 +343,7 @@
},
"delete": {
"tags": [
"company_data"
"companydata"
],
"description": "delete the CompanyData",
"operationId": "CompanyDataController.Delete",
@ -188,179 +366,6 @@
}
}
},
"/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": [
@ -706,9 +711,185 @@
}
}
}
},
"/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 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"
}
}
}
},
"/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"
}
}
}
}
},
"definitions": {
".Auth": {
"type": "object"
},
"models.CompanyData": {
"title": "CompanyData",
"type": "object",
@ -835,7 +1016,7 @@
"description": "ContactController operations for Contact\n"
},
{
"name": "company_data",
"name": "companydata",
"description": "CompanyDataController operations for CompanyData\n"
},
{
@ -843,8 +1024,12 @@
"description": "PostController operations for Post\n"
},
{
"name": "company_user",
"name": "user",
"description": "CompanyUserController operations for CompanyUser\n"
},
{
"name": "auth",
"description": "AuthController operations for Auth\n"
}
]
}