src.dualinventive.com/go/assets-service/rest/server/embedded_spec.go

435 lines
9.7 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 Asset API",
"title": "Asset API",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "patrick.vanleeuwen@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": "/assets-service/v1",
"paths": {
"/assets": {
"get": {
"security": [
{
"AccessToken": []
}
],
"description": "Returns a list of assets",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Assets"
],
"operationId": "GetAssets",
"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",
"uid",
"uid:asc",
"uid:desc",
"serialnr",
"serialnr:asc",
"serialnr:desc"
],
"type": "string",
"default": "id",
"description": "Sorting column",
"name": "sort",
"in": "query"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/AssetsList"
}
},
"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"
}
}
}
}
},
"/assets/{assetID}": {
"get": {
"security": [
{
"AccessToken": []
}
],
"description": "Returns an Asset by the given assetID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Assets"
],
"operationId": "GetAssetByID",
"parameters": [
{
"minimum": 1,
"type": "integer",
"description": "AssetID",
"name": "assetID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Asset"
}
},
"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": {
"Asset": {
"properties": {
"id": {
"type": "integer"
},
"serialNr": {
"type": "string"
},
"typeCode": {
"type": "string"
},
"uid": {
"type": "string"
}
}
},
"AssetsList": {
"properties": {
"asset": {
"type": "array",
"items": {
"$ref": "#/definitions/Asset"
}
},
"count": {
"type": "integer"
}
}
},
"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 Asset API",
"title": "Asset API",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "patrick.vanleeuwen@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": "/assets-service/v1",
"paths": {
"/assets": {
"get": {
"security": [
{
"AccessToken": []
}
],
"description": "Returns a list of assets",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Assets"
],
"operationId": "GetAssets",
"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",
"uid",
"uid:asc",
"uid:desc",
"serialnr",
"serialnr:asc",
"serialnr:desc"
],
"type": "string",
"default": "id",
"description": "Sorting column",
"name": "sort",
"in": "query"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/AssetsList"
}
},
"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"
}
}
}
}
},
"/assets/{assetID}": {
"get": {
"security": [
{
"AccessToken": []
}
],
"description": "Returns an Asset by the given assetID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Assets"
],
"operationId": "GetAssetByID",
"parameters": [
{
"minimum": 1,
"type": "integer",
"description": "AssetID",
"name": "assetID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Asset"
}
},
"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": {
"Asset": {
"properties": {
"id": {
"type": "integer"
},
"serialNr": {
"type": "string"
},
"typeCode": {
"type": "string"
},
"uid": {
"type": "string"
}
}
},
"AssetsList": {
"properties": {
"asset": {
"type": "array",
"items": {
"$ref": "#/definitions/Asset"
}
},
"count": {
"type": "integer"
}
}
},
"ErrResponse": {
"properties": {
"errMsg": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"AccessToken": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}`))
}