homebox/backend/app/api/docs/swagger.json

1794 lines
59 KiB
JSON
Raw Normal View History

2022-08-30 02:30:36 +00:00
{
"swagger": "2.0",
"info": {
"description": "This is a simple Rest API Server Template that implements some basic User and Authentication patterns to help you get started and bootstrap your next project!.",
"title": "Go API Templates",
"contact": {
"name": "Don't"
},
"license": {
"name": "MIT"
},
"version": "1.0"
},
"basePath": "/api",
"paths": {
"/status": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Base"
],
"summary": "Retrieves the basic information about the API",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
"$ref": "#/definitions/types.ApiSummary"
}
}
}
]
}
}
}
}
},
"/v1/admin/users": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Gets all users from the database",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
"type": "array",
"items": {
2022-08-30 18:05:11 +00:00
"$ref": "#/definitions/ent.User"
2022-08-30 02:30:36 +00:00
}
}
}
}
]
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Create a new user",
"parameters": [
{
"description": "User Data",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.UserCreate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
2022-08-30 18:05:11 +00:00
"$ref": "#/definitions/ent.User"
2022-08-30 02:30:36 +00:00
}
}
}
]
}
}
}
}
},
"/v1/admin/users/{id}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Get a user from the database",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
2022-08-30 18:05:11 +00:00
"$ref": "#/definitions/ent.User"
2022-08-30 02:30:36 +00:00
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Update a User",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "User Data",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.UserUpdate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
2022-08-30 18:05:11 +00:00
"$ref": "#/definitions/ent.User"
2022-08-30 02:30:36 +00:00
}
}
}
]
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Delete a User",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": ""
}
}
}
},
2022-09-03 09:17:48 +00:00
"/v1/items": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Items"
],
"summary": "Get All Items",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Results"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/types.ItemOut"
}
}
}
}
]
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Items"
],
"summary": "Create a new item",
"parameters": [
{
"description": "Item Data",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.ItemCreate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.ItemSummary"
}
}
}
}
},
"/v1/items/{id}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Items"
],
"summary": "Gets a item and fields",
"parameters": [
{
"type": "string",
"description": "Item ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.ItemOut"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Items"
],
"summary": "updates a item",
"parameters": [
{
"type": "string",
"description": "Item ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.ItemOut"
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Items"
],
"summary": "deletes a item",
"parameters": [
{
"type": "string",
"description": "Item ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": ""
}
}
}
},
2022-09-01 23:11:14 +00:00
"/v1/labels": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Labels"
],
"summary": "Get All Labels",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Results"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/types.LabelOut"
}
}
}
}
]
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Labels"
],
"summary": "Create a new label",
"parameters": [
{
"description": "Label Data",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.LabelCreate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.LabelSummary"
}
}
}
}
},
"/v1/labels/{id}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Labels"
],
"summary": "Gets a label and fields",
"parameters": [
{
"type": "string",
"description": "Label ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.LabelOut"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Labels"
],
"summary": "updates a label",
"parameters": [
{
"type": "string",
"description": "Label ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.LabelOut"
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Labels"
],
"summary": "deletes a label",
"parameters": [
{
"type": "string",
"description": "Label ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": ""
}
}
}
},
2022-08-31 05:22:01 +00:00
"/v1/locations": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Locations"
],
"summary": "Get All Locations",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Results"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
2022-09-03 09:17:48 +00:00
"$ref": "#/definitions/types.LocationCount"
2022-08-31 05:22:01 +00:00
}
}
}
}
]
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Locations"
],
"summary": "Create a new location",
"parameters": [
{
"description": "Location Data",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.LocationCreate"
}
}
],
2022-09-01 22:32:03 +00:00
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.LocationSummary"
}
}
}
}
},
"/v1/locations/{id}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Locations"
],
"summary": "Gets a location and fields",
"parameters": [
{
"type": "string",
"description": "Location ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.LocationOut"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Locations"
],
"summary": "updates a location",
"parameters": [
{
"type": "string",
"description": "Location ID",
"name": "id",
"in": "path",
"required": true
}
],
2022-08-31 05:22:01 +00:00
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.LocationOut"
}
}
}
2022-09-01 22:32:03 +00:00
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Locations"
],
"summary": "deletes a location",
"parameters": [
{
"type": "string",
"description": "Location ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": ""
}
}
2022-08-31 05:22:01 +00:00
}
},
2022-08-30 02:30:36 +00:00
"/v1/users/login": {
"post": {
"consumes": [
"application/x-www-form-urlencoded",
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Authentication"
],
"summary": "User Login",
"parameters": [
{
"type": "string",
"example": "admin@admin.com",
"description": "string",
"name": "username",
"in": "formData"
},
{
"type": "string",
"example": "admin",
"description": "string",
"name": "password",
"in": "formData"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.TokenResponse"
}
}
}
}
},
"/v1/users/logout": {
"post": {
"security": [
{
"Bearer": []
}
],
"tags": [
"Authentication"
],
"summary": "User Logout",
"responses": {
"204": {
"description": ""
}
}
}
},
"/v1/users/refresh": {
"get": {
"security": [
{
"Bearer": []
}
],
"description": "handleAuthRefresh returns a handler that will issue a new token from an existing token.\nThis does not validate that the user still exists within the database.",
"tags": [
"Authentication"
],
"summary": "User Token Refresh",
"responses": {
"200": {
"description": ""
}
}
}
},
2022-08-30 18:05:11 +00:00
"/v1/users/register": {
"post": {
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "Get the current user",
"parameters": [
{
"description": "User Data",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.UserRegistration"
}
}
],
"responses": {
2022-08-31 05:22:01 +00:00
"204": {
"description": ""
2022-08-30 18:05:11 +00:00
}
}
}
},
2022-08-30 02:30:36 +00:00
"/v1/users/self": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "Get the current user",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
2022-08-30 18:05:11 +00:00
"$ref": "#/definitions/ent.User"
2022-08-30 02:30:36 +00:00
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "Update the current user",
"parameters": [
{
"description": "User Data",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.UserUpdate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
"$ref": "#/definitions/types.UserUpdate"
}
}
}
]
}
}
}
}
},
"/v1/users/self/password": {
"put": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "Update the current user's password // TODO:",
"responses": {
"204": {
"description": ""
}
}
}
}
},
"definitions": {
2022-08-30 18:05:11 +00:00
"ent.AuthTokens": {
"type": "object",
"properties": {
"created_at": {
"description": "CreatedAt holds the value of the \"created_at\" field.",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthTokensQuery when eager-loading is set.",
"$ref": "#/definitions/ent.AuthTokensEdges"
},
"expires_at": {
"description": "ExpiresAt holds the value of the \"expires_at\" field.",
"type": "string"
},
"id": {
"description": "ID of the ent.",
"type": "string"
},
"token": {
"description": "Token holds the value of the \"token\" field.",
"type": "array",
"items": {
"type": "integer"
}
},
"updated_at": {
"description": "UpdatedAt holds the value of the \"updated_at\" field.",
"type": "string"
}
}
},
"ent.AuthTokensEdges": {
"type": "object",
"properties": {
"user": {
"description": "User holds the value of the user edge.",
"$ref": "#/definitions/ent.User"
}
}
},
"ent.Group": {
"type": "object",
"properties": {
"created_at": {
"description": "CreatedAt holds the value of the \"created_at\" field.",
"type": "string"
},
"currency": {
"description": "Currency holds the value of the \"currency\" field.",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupQuery when eager-loading is set.",
"$ref": "#/definitions/ent.GroupEdges"
},
"id": {
"description": "ID of the ent.",
"type": "string"
},
"name": {
"description": "Name holds the value of the \"name\" field.",
"type": "string"
},
"updated_at": {
"description": "UpdatedAt holds the value of the \"updated_at\" field.",
"type": "string"
}
}
},
"ent.GroupEdges": {
"type": "object",
"properties": {
"items": {
"description": "Items holds the value of the items edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.Item"
}
},
"labels": {
"description": "Labels holds the value of the labels edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.Label"
}
},
"locations": {
"description": "Locations holds the value of the locations edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.Location"
}
},
"users": {
"description": "Users holds the value of the users edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.User"
}
}
}
},
"ent.Item": {
"type": "object",
"properties": {
"created_at": {
"description": "CreatedAt holds the value of the \"created_at\" field.",
"type": "string"
},
"description": {
"description": "Description holds the value of the \"description\" field.",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the ItemQuery when eager-loading is set.",
"$ref": "#/definitions/ent.ItemEdges"
},
"id": {
"description": "ID of the ent.",
"type": "string"
},
"manufacturer": {
"description": "Manufacturer holds the value of the \"manufacturer\" field.",
"type": "string"
},
"model_number": {
"description": "ModelNumber holds the value of the \"model_number\" field.",
"type": "string"
},
"name": {
"description": "Name holds the value of the \"name\" field.",
"type": "string"
},
"notes": {
"description": "Notes holds the value of the \"notes\" field.",
"type": "string"
},
"purchase_from": {
"description": "PurchaseFrom holds the value of the \"purchase_from\" field.",
"type": "string"
},
"purchase_price": {
"description": "PurchasePrice holds the value of the \"purchase_price\" field.",
"type": "number"
},
"purchase_receipt_id": {
"description": "PurchaseReceiptID holds the value of the \"purchase_receipt_id\" field.",
"type": "string"
},
"purchase_time": {
"description": "PurchaseTime holds the value of the \"purchase_time\" field.",
"type": "string"
},
"serial_number": {
"description": "SerialNumber holds the value of the \"serial_number\" field.",
"type": "string"
},
"sold_notes": {
"description": "SoldNotes holds the value of the \"sold_notes\" field.",
"type": "string"
},
"sold_price": {
"description": "SoldPrice holds the value of the \"sold_price\" field.",
"type": "number"
},
"sold_receipt_id": {
"description": "SoldReceiptID holds the value of the \"sold_receipt_id\" field.",
"type": "string"
},
"sold_time": {
"description": "SoldTime holds the value of the \"sold_time\" field.",
"type": "string"
},
"sold_to": {
"description": "SoldTo holds the value of the \"sold_to\" field.",
"type": "string"
},
"updated_at": {
"description": "UpdatedAt holds the value of the \"updated_at\" field.",
"type": "string"
}
}
},
"ent.ItemEdges": {
"type": "object",
"properties": {
"fields": {
"description": "Fields holds the value of the fields edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.ItemField"
}
},
"group": {
"description": "Group holds the value of the group edge.",
"$ref": "#/definitions/ent.Group"
},
"label": {
"description": "Label holds the value of the label edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.Label"
}
},
"location": {
"description": "Location holds the value of the location edge.",
"$ref": "#/definitions/ent.Location"
}
}
},
"ent.ItemField": {
"type": "object",
"properties": {
"boolean_value": {
"description": "BooleanValue holds the value of the \"boolean_value\" field.",
"type": "boolean"
},
"created_at": {
"description": "CreatedAt holds the value of the \"created_at\" field.",
"type": "string"
},
"description": {
"description": "Description holds the value of the \"description\" field.",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the ItemFieldQuery when eager-loading is set.",
"$ref": "#/definitions/ent.ItemFieldEdges"
},
"id": {
"description": "ID of the ent.",
"type": "string"
},
"name": {
"description": "Name holds the value of the \"name\" field.",
"type": "string"
},
"number_value": {
"description": "NumberValue holds the value of the \"number_value\" field.",
"type": "integer"
},
"text_value": {
"description": "TextValue holds the value of the \"text_value\" field.",
"type": "string"
},
"time_value": {
"description": "TimeValue holds the value of the \"time_value\" field.",
"type": "string"
},
"type": {
"description": "Type holds the value of the \"type\" field.",
"type": "string"
},
"updated_at": {
"description": "UpdatedAt holds the value of the \"updated_at\" field.",
"type": "string"
}
}
},
"ent.ItemFieldEdges": {
"type": "object",
"properties": {
"item": {
"description": "Item holds the value of the item edge.",
"$ref": "#/definitions/ent.Item"
}
}
},
"ent.Label": {
"type": "object",
"properties": {
"color": {
"description": "Color holds the value of the \"color\" field.",
"type": "string"
},
"created_at": {
"description": "CreatedAt holds the value of the \"created_at\" field.",
"type": "string"
},
"description": {
"description": "Description holds the value of the \"description\" field.",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the LabelQuery when eager-loading is set.",
"$ref": "#/definitions/ent.LabelEdges"
},
"id": {
"description": "ID of the ent.",
"type": "string"
},
"name": {
"description": "Name holds the value of the \"name\" field.",
"type": "string"
},
"updated_at": {
"description": "UpdatedAt holds the value of the \"updated_at\" field.",
"type": "string"
}
}
},
"ent.LabelEdges": {
"type": "object",
"properties": {
"group": {
"description": "Group holds the value of the group edge.",
"$ref": "#/definitions/ent.Group"
},
"items": {
"description": "Items holds the value of the items edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.Item"
}
}
}
},
"ent.Location": {
"type": "object",
"properties": {
"created_at": {
"description": "CreatedAt holds the value of the \"created_at\" field.",
"type": "string"
},
"description": {
"description": "Description holds the value of the \"description\" field.",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the LocationQuery when eager-loading is set.",
"$ref": "#/definitions/ent.LocationEdges"
},
"id": {
"description": "ID of the ent.",
"type": "string"
},
"name": {
"description": "Name holds the value of the \"name\" field.",
"type": "string"
},
"updated_at": {
"description": "UpdatedAt holds the value of the \"updated_at\" field.",
"type": "string"
}
}
},
"ent.LocationEdges": {
"type": "object",
"properties": {
"group": {
"description": "Group holds the value of the group edge.",
"$ref": "#/definitions/ent.Group"
},
"items": {
"description": "Items holds the value of the items edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.Item"
}
}
}
},
"ent.User": {
"type": "object",
"properties": {
"created_at": {
"description": "CreatedAt holds the value of the \"created_at\" field.",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the UserQuery when eager-loading is set.",
"$ref": "#/definitions/ent.UserEdges"
},
"email": {
"description": "Email holds the value of the \"email\" field.",
"type": "string"
},
"id": {
"description": "ID of the ent.",
"type": "string"
},
"is_superuser": {
"description": "IsSuperuser holds the value of the \"is_superuser\" field.",
"type": "boolean"
},
"name": {
"description": "Name holds the value of the \"name\" field.",
"type": "string"
},
"updated_at": {
"description": "UpdatedAt holds the value of the \"updated_at\" field.",
"type": "string"
}
}
},
"ent.UserEdges": {
"type": "object",
"properties": {
"auth_tokens": {
"description": "AuthTokens holds the value of the auth_tokens edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.AuthTokens"
}
},
"group": {
"description": "Group holds the value of the group edge.",
"$ref": "#/definitions/ent.Group"
}
}
},
2022-08-30 02:30:36 +00:00
"server.Result": {
"type": "object",
"properties": {
"details": {},
"error": {
"type": "boolean"
},
"item": {},
"message": {
"type": "string"
}
}
},
2022-08-31 05:22:01 +00:00
"server.Results": {
"type": "object",
"properties": {
"items": {
"type": "any"
}
}
},
2022-08-30 02:30:36 +00:00
"types.ApiSummary": {
"type": "object",
"properties": {
"health": {
"type": "boolean"
},
"message": {
"type": "string"
},
"title": {
"type": "string"
},
"versions": {
"type": "array",
"items": {
"type": "string"
}
}
2022-08-31 05:22:01 +00:00
}
},
2022-09-03 09:17:48 +00:00
"types.ItemCreate": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
}
},
"locationId": {
"description": "Edges",
"type": "string"
},
"name": {
"type": "string"
}
}
},
"types.ItemOut": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"labels": {
"type": "array",
"items": {
"$ref": "#/definitions/types.LabelSummary"
}
},
"location": {
"description": "Edges",
"$ref": "#/definitions/types.LocationSummary"
},
"manufacturer": {
"type": "string"
},
"modelNumber": {
"type": "string"
},
"name": {
"type": "string"
},
"notes": {
"description": "Extras",
"type": "string"
},
"purchaseFrom": {
"type": "string"
},
"purchasePrice": {
"type": "number"
},
"purchaseTime": {
"description": "Purchase",
"type": "string"
},
"serialNumber": {
"description": "Identifications",
"type": "string"
},
"soldNotes": {
"type": "string"
},
"soldPrice": {
"type": "number"
},
"soldTime": {
"description": "Sold",
"type": "string"
},
"soldTo": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
}
},
2022-09-01 22:32:03 +00:00
"types.ItemSummary": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
2022-09-03 09:17:48 +00:00
"labels": {
"type": "array",
"items": {
"$ref": "#/definitions/types.LabelSummary"
}
},
"location": {
"description": "Edges",
"$ref": "#/definitions/types.LocationSummary"
},
"manufacturer": {
"type": "string"
},
"modelNumber": {
2022-09-01 22:32:03 +00:00
"type": "string"
},
"name": {
"type": "string"
},
2022-09-03 09:17:48 +00:00
"notes": {
"description": "Extras",
"type": "string"
},
"purchaseFrom": {
"type": "string"
},
"purchasePrice": {
"type": "number"
},
"purchaseTime": {
"description": "Purchase",
"type": "string"
},
"serialNumber": {
"description": "Identifications",
"type": "string"
},
"soldNotes": {
"type": "string"
},
"soldPrice": {
"type": "number"
},
"soldTime": {
"description": "Sold",
"type": "string"
},
"soldTo": {
"type": "string"
},
2022-09-01 22:32:03 +00:00
"updatedAt": {
"type": "string"
}
}
},
2022-09-01 23:11:14 +00:00
"types.LabelCreate": {
2022-09-02 01:52:40 +00:00
"type": "object",
"properties": {
"color": {
"type": "string"
},
"description": {
"type": "string"
},
"name": {
"type": "string"
}
}
2022-09-01 23:11:14 +00:00
},
"types.LabelOut": {
2022-09-02 01:52:40 +00:00
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
"groupId": {
"type": "string"
},
"id": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/types.ItemSummary"
}
},
"name": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
}
2022-09-01 23:11:14 +00:00
},
"types.LabelSummary": {
2022-09-02 01:52:40 +00:00
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
"groupId": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
}
2022-09-01 23:11:14 +00:00
},
2022-09-03 09:17:48 +00:00
"types.LocationCount": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
"groupId": {
"type": "string"
},
"id": {
"type": "string"
},
"itemCount": {
"type": "integer"
},
"name": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
}
},
2022-08-31 05:22:01 +00:00
"types.LocationCreate": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"types.LocationOut": {
2022-09-01 22:32:03 +00:00
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
"groupId": {
"type": "string"
},
"id": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/types.ItemSummary"
}
},
"name": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
}
},
"types.LocationSummary": {
2022-08-31 05:22:01 +00:00
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
"groupId": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
2022-08-30 02:30:36 +00:00
}
},
"types.TokenResponse": {
"type": "object",
"properties": {
"expiresAt": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
"types.UserCreate": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
2022-08-30 18:05:11 +00:00
"groupID": {
"type": "string"
},
2022-08-30 02:30:36 +00:00
"isSuperuser": {
"type": "boolean"
},
"name": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
2022-08-30 18:05:11 +00:00
"types.UserIn": {
2022-08-30 02:30:36 +00:00
"type": "object",
"properties": {
"email": {
"type": "string"
},
2022-08-30 18:05:11 +00:00
"name": {
2022-08-30 02:30:36 +00:00
"type": "string"
},
2022-08-30 18:05:11 +00:00
"password": {
"type": "string"
}
}
},
"types.UserRegistration": {
"type": "object",
"properties": {
"groupName": {
2022-08-30 02:30:36 +00:00
"type": "string"
2022-08-30 18:05:11 +00:00
},
"user": {
"$ref": "#/definitions/types.UserIn"
2022-08-30 02:30:36 +00:00
}
}
},
"types.UserUpdate": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"Bearer": {
"description": "\"Type 'Bearer TOKEN' to correctly set the API Key\"",
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}