423 lines
9.5 KiB
Go
423 lines
9.5 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package server
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
var (
|
|
// SwaggerJSON embedded version of the swagger document used at generation time
|
|
SwaggerJSON json.RawMessage
|
|
// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
|
|
FlatSwaggerJSON json.RawMessage
|
|
)
|
|
|
|
func init() {
|
|
SwaggerJSON = json.RawMessage([]byte(`{
|
|
"schemes": [
|
|
"https"
|
|
],
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "DualInventive's common companies API",
|
|
"title": "Companies API",
|
|
"termsOfService": "http://swagger.io/terms/",
|
|
"contact": {
|
|
"name": "sven.vantrijp@dualinventive.com"
|
|
},
|
|
"license": {
|
|
"name": "Apache 2.0",
|
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
|
},
|
|
"version": "1.0.1"
|
|
},
|
|
"host": "api.mtinfo3000.com",
|
|
"basePath": "/companies-service/v1",
|
|
"paths": {
|
|
"/companies": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"AccessToken": []
|
|
}
|
|
],
|
|
"description": "Returns a list of companies",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Companies"
|
|
],
|
|
"operationId": "GetCompanies",
|
|
"parameters": [
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"maximum": 200,
|
|
"minimum": 1,
|
|
"type": "integer",
|
|
"default": 200,
|
|
"description": "Items per page",
|
|
"name": "per_page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"enum": [
|
|
"id",
|
|
"id:asc",
|
|
"id:desc",
|
|
"name",
|
|
"name:asc",
|
|
"name:desc"
|
|
],
|
|
"type": "string",
|
|
"default": "id",
|
|
"description": "Sorting column",
|
|
"name": "sort",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"schema": {
|
|
"$ref": "#/definitions/CompaniesList"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "authentication failed",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/companies/{companyID}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"AccessToken": []
|
|
}
|
|
],
|
|
"description": "Returns a Company by the given companyID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Companies"
|
|
],
|
|
"operationId": "GetCompanyByID",
|
|
"parameters": [
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer",
|
|
"description": "CompanyID",
|
|
"name": "companyID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"schema": {
|
|
"$ref": "#/definitions/Company"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "authentication failed",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"CompaniesList": {
|
|
"properties": {
|
|
"company": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Company"
|
|
}
|
|
},
|
|
"count": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"Company": {
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"ErrResponse": {
|
|
"properties": {
|
|
"errMsg": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"AccessToken": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}`))
|
|
FlatSwaggerJSON = json.RawMessage([]byte(`{
|
|
"schemes": [
|
|
"https"
|
|
],
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "DualInventive's common companies API",
|
|
"title": "Companies API",
|
|
"termsOfService": "http://swagger.io/terms/",
|
|
"contact": {
|
|
"name": "sven.vantrijp@dualinventive.com"
|
|
},
|
|
"license": {
|
|
"name": "Apache 2.0",
|
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
|
},
|
|
"version": "1.0.1"
|
|
},
|
|
"host": "api.mtinfo3000.com",
|
|
"basePath": "/companies-service/v1",
|
|
"paths": {
|
|
"/companies": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"AccessToken": []
|
|
}
|
|
],
|
|
"description": "Returns a list of companies",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Companies"
|
|
],
|
|
"operationId": "GetCompanies",
|
|
"parameters": [
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"maximum": 200,
|
|
"minimum": 1,
|
|
"type": "integer",
|
|
"default": 200,
|
|
"description": "Items per page",
|
|
"name": "per_page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"enum": [
|
|
"id",
|
|
"id:asc",
|
|
"id:desc",
|
|
"name",
|
|
"name:asc",
|
|
"name:desc"
|
|
],
|
|
"type": "string",
|
|
"default": "id",
|
|
"description": "Sorting column",
|
|
"name": "sort",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"schema": {
|
|
"$ref": "#/definitions/CompaniesList"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "authentication failed",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/companies/{companyID}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"AccessToken": []
|
|
}
|
|
],
|
|
"description": "Returns a Company by the given companyID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Companies"
|
|
],
|
|
"operationId": "GetCompanyByID",
|
|
"parameters": [
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer",
|
|
"description": "CompanyID",
|
|
"name": "companyID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"schema": {
|
|
"$ref": "#/definitions/Company"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "authentication failed",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"$ref": "#/definitions/ErrResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"CompaniesList": {
|
|
"properties": {
|
|
"company": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Company"
|
|
}
|
|
},
|
|
"count": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"Company": {
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"ErrResponse": {
|
|
"properties": {
|
|
"errMsg": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"AccessToken": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}`))
|
|
}
|