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

509 lines
11 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 user API",
"title": "Users 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": "/users-service/v1",
"paths": {
"/users": {
"get": {
"security": [
{
"AccessToken": []
}
],
"description": "Returns a list of users",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"operationId": "ListUsers",
"parameters": [
{
"type": "string",
"description": "Reference filter",
"name": "reference",
"in": "query"
},
{
"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/UsersList"
}
},
"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"
}
}
}
}
},
"/users/{userID}": {
"get": {
"security": [
{
"AccessToken": []
}
],
"description": "Returns a User by the given userID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"operationId": "GetUserByID",
"parameters": [
{
"minimum": 1,
"type": "integer",
"description": "UserID",
"name": "userID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/User"
}
},
"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": {
"ErrResponse": {
"properties": {
"errMsg": {
"type": "string"
}
}
},
"User": {
"properties": {
"company": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"firstname": {
"type": "string"
},
"id": {
"type": "integer"
},
"lastname": {
"type": "string"
},
"reference": {
"type": "string"
},
"roles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"rights": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"username": {
"type": "string"
}
}
},
"UsersList": {
"properties": {
"count": {
"type": "integer"
},
"users": {
"type": "array",
"items": {
"$ref": "#/definitions/User"
}
}
}
}
},
"securityDefinitions": {
"AccessToken": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}`))
FlatSwaggerJSON = json.RawMessage([]byte(`{
"schemes": [
"https"
],
"swagger": "2.0",
"info": {
"description": "DualInventive's common user API",
"title": "Users 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": "/users-service/v1",
"paths": {
"/users": {
"get": {
"security": [
{
"AccessToken": []
}
],
"description": "Returns a list of users",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"operationId": "ListUsers",
"parameters": [
{
"type": "string",
"description": "Reference filter",
"name": "reference",
"in": "query"
},
{
"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/UsersList"
}
},
"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"
}
}
}
}
},
"/users/{userID}": {
"get": {
"security": [
{
"AccessToken": []
}
],
"description": "Returns a User by the given userID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"operationId": "GetUserByID",
"parameters": [
{
"minimum": 1,
"type": "integer",
"description": "UserID",
"name": "userID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/User"
}
},
"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": {
"ErrResponse": {
"properties": {
"errMsg": {
"type": "string"
}
}
},
"User": {
"properties": {
"company": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"firstname": {
"type": "string"
},
"id": {
"type": "integer"
},
"lastname": {
"type": "string"
},
"reference": {
"type": "string"
},
"roles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"rights": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"username": {
"type": "string"
}
}
},
"UsersList": {
"properties": {
"count": {
"type": "integer"
},
"users": {
"type": "array",
"items": {
"$ref": "#/definitions/User"
}
}
}
}
},
"securityDefinitions": {
"AccessToken": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}`))
}