mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-22 10:30:28 +00:00
audit and update documentation + improve format
This commit is contained in:
parent
9c6421a9ff
commit
ccd40ffcac
20 changed files with 655 additions and 589 deletions
|
@ -28,13 +28,14 @@ const docTemplate = `{
|
|||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Ensures all items in the database have an asset ID",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Group"
|
||||
"Actions"
|
||||
],
|
||||
"summary": "Ensures all items in the database have an asset id",
|
||||
"summary": "Ensure Asset IDs",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -52,13 +53,14 @@ const docTemplate = `{
|
|||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Ensures all items in the database have an import ref",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Group"
|
||||
"Actions"
|
||||
],
|
||||
"summary": "Ensures all items in the database have an import ref",
|
||||
"summary": "Ensures Import Refs",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -76,13 +78,14 @@ const docTemplate = `{
|
|||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Resets all item date fields to the beginning of the day",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Group"
|
||||
"Actions"
|
||||
],
|
||||
"summary": "Resets all item date fields to the beginning of the day",
|
||||
"summary": "Zero Out Time Fields",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -104,9 +107,9 @@ const docTemplate = `{
|
|||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Assets"
|
||||
"Items"
|
||||
],
|
||||
"summary": "Gets an item by Asset ID",
|
||||
"summary": "Get Item by Asset ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -139,7 +142,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Group"
|
||||
],
|
||||
"summary": "Get the current user's group",
|
||||
"summary": "Get Group",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -161,7 +164,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Group"
|
||||
],
|
||||
"summary": "Updates some fields of the current users group",
|
||||
"summary": "Update Group",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "User Data",
|
||||
|
@ -196,7 +199,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Group"
|
||||
],
|
||||
"summary": "Get the current user",
|
||||
"summary": "Create Group Invitation",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "User Data",
|
||||
|
@ -231,7 +234,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "Get the current user's group statistics",
|
||||
"summary": "Get Group Statistics",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -255,7 +258,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "Get the current user's group statistics",
|
||||
"summary": "Get Label Statistics",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -282,7 +285,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "Get the current user's group statistics",
|
||||
"summary": "Get Location Statistics",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -309,7 +312,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "Queries the changes overtime of the purchase price over time",
|
||||
"summary": "Get Purchase Price Statistics",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -347,7 +350,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "Get All Items",
|
||||
"summary": "Query All Items",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -409,7 +412,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "Create a new item",
|
||||
"summary": "Create Item",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Item Data",
|
||||
|
@ -441,7 +444,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "exports items into the database",
|
||||
"summary": "Export Items",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "text/csv",
|
||||
|
@ -465,7 +468,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "imports items into the database",
|
||||
"summary": "Get All Custom Field Names",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -492,7 +495,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "imports items into the database",
|
||||
"summary": "Get All Custom Field Values",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -519,7 +522,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "imports items into the database",
|
||||
"summary": "Import Items",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "file",
|
||||
|
@ -549,7 +552,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "Gets a item and fields",
|
||||
"summary": "Get Item",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -580,7 +583,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "updates a item",
|
||||
"summary": "Update Item",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -620,7 +623,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "deletes a item",
|
||||
"summary": "Delete Item",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -650,7 +653,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items Attachments"
|
||||
],
|
||||
"summary": "imports items into the database",
|
||||
"summary": "Create Item Attachment",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -710,7 +713,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items Attachments"
|
||||
],
|
||||
"summary": "retrieves an attachment for an item",
|
||||
"summary": "Get Item Attachment",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -745,7 +748,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items Attachments"
|
||||
],
|
||||
"summary": "retrieves an attachment for an item",
|
||||
"summary": "Update Item Attachment",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -789,7 +792,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items Attachments"
|
||||
],
|
||||
"summary": "retrieves an attachment for an item",
|
||||
"summary": "Delete Item Attachment",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -974,7 +977,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Labels"
|
||||
],
|
||||
"summary": "Create a new label",
|
||||
"summary": "Create Label",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Label Data",
|
||||
|
@ -1009,7 +1012,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Labels"
|
||||
],
|
||||
"summary": "Gets a label and fields",
|
||||
"summary": "Get Label",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1040,7 +1043,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Labels"
|
||||
],
|
||||
"summary": "updates a label",
|
||||
"summary": "Update Label",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1071,7 +1074,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Labels"
|
||||
],
|
||||
"summary": "deletes a label",
|
||||
"summary": "Delete Label",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1146,7 +1149,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Locations"
|
||||
],
|
||||
"summary": "Create a new location",
|
||||
"summary": "Create Location",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Location Data",
|
||||
|
@ -1181,7 +1184,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Locations"
|
||||
],
|
||||
"summary": "Get All Locations",
|
||||
"summary": "Get Locations Tree",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "boolean",
|
||||
|
@ -1228,7 +1231,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Locations"
|
||||
],
|
||||
"summary": "Gets a location and fields",
|
||||
"summary": "Get Location",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1259,7 +1262,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Locations"
|
||||
],
|
||||
"summary": "updates a location",
|
||||
"summary": "Update Location",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1299,7 +1302,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Locations"
|
||||
],
|
||||
"summary": "deletes a location",
|
||||
"summary": "Delete Location",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1329,7 +1332,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Notifiers"
|
||||
],
|
||||
"summary": "Get All notifier",
|
||||
"summary": "Get Notifiers",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -1366,7 +1369,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Notifiers"
|
||||
],
|
||||
"summary": "Create a new notifier",
|
||||
"summary": "Create Notifier",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Notifier Data",
|
||||
|
@ -1401,7 +1404,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Notifiers"
|
||||
],
|
||||
"summary": "Test notifier",
|
||||
"summary": "Test Notifier",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1435,7 +1438,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Notifiers"
|
||||
],
|
||||
"summary": "Update a notifier",
|
||||
"summary": "Update Notifier",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1472,7 +1475,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Notifiers"
|
||||
],
|
||||
"summary": "Delete a notifier",
|
||||
"summary": "Delete a Notifier",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1502,7 +1505,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "Encode data into QRCode",
|
||||
"summary": "Create QR Code",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1534,7 +1537,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Reporting"
|
||||
],
|
||||
"summary": "Generates a Bill of Materials CSV",
|
||||
"summary": "Export Bill of Materials",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "text/csv",
|
||||
|
@ -1553,7 +1556,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"Base"
|
||||
],
|
||||
"summary": "Retrieves the basic information about the API",
|
||||
"summary": "Application Info",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -1574,7 +1577,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Updates the users password",
|
||||
"summary": "Change Password",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Password Payload",
|
||||
|
@ -1677,7 +1680,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Get the current user",
|
||||
"summary": "Register New User",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "User Data",
|
||||
|
@ -1709,7 +1712,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Get the current user",
|
||||
"summary": "Get User Self",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -1743,7 +1746,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Update the current user",
|
||||
"summary": "Update Account",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "User Data",
|
||||
|
@ -1788,7 +1791,7 @@ const docTemplate = `{
|
|||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Deletes the user account",
|
||||
"summary": "Delete Account",
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
|
@ -2836,8 +2839,8 @@ var SwaggerInfo = &swag.Spec{
|
|||
Host: "",
|
||||
BasePath: "/api",
|
||||
Schemes: []string{},
|
||||
Title: "Go API Templates",
|
||||
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: "Homebox API",
|
||||
Description: "Track, Manage, and Organize your Shit.",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"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",
|
||||
"description": "Track, Manage, and Organize your Shit.",
|
||||
"title": "Homebox API",
|
||||
"contact": {
|
||||
"name": "Don't"
|
||||
},
|
||||
|
@ -20,13 +20,14 @@
|
|||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Ensures all items in the database have an asset ID",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Group"
|
||||
"Actions"
|
||||
],
|
||||
"summary": "Ensures all items in the database have an asset id",
|
||||
"summary": "Ensure Asset IDs",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -44,13 +45,14 @@
|
|||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Ensures all items in the database have an import ref",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Group"
|
||||
"Actions"
|
||||
],
|
||||
"summary": "Ensures all items in the database have an import ref",
|
||||
"summary": "Ensures Import Refs",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -68,13 +70,14 @@
|
|||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Resets all item date fields to the beginning of the day",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Group"
|
||||
"Actions"
|
||||
],
|
||||
"summary": "Resets all item date fields to the beginning of the day",
|
||||
"summary": "Zero Out Time Fields",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -96,9 +99,9 @@
|
|||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Assets"
|
||||
"Items"
|
||||
],
|
||||
"summary": "Gets an item by Asset ID",
|
||||
"summary": "Get Item by Asset ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -131,7 +134,7 @@
|
|||
"tags": [
|
||||
"Group"
|
||||
],
|
||||
"summary": "Get the current user's group",
|
||||
"summary": "Get Group",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -153,7 +156,7 @@
|
|||
"tags": [
|
||||
"Group"
|
||||
],
|
||||
"summary": "Updates some fields of the current users group",
|
||||
"summary": "Update Group",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "User Data",
|
||||
|
@ -188,7 +191,7 @@
|
|||
"tags": [
|
||||
"Group"
|
||||
],
|
||||
"summary": "Get the current user",
|
||||
"summary": "Create Group Invitation",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "User Data",
|
||||
|
@ -223,7 +226,7 @@
|
|||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "Get the current user's group statistics",
|
||||
"summary": "Get Group Statistics",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -247,7 +250,7 @@
|
|||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "Get the current user's group statistics",
|
||||
"summary": "Get Label Statistics",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -274,7 +277,7 @@
|
|||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "Get the current user's group statistics",
|
||||
"summary": "Get Location Statistics",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -301,7 +304,7 @@
|
|||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "Queries the changes overtime of the purchase price over time",
|
||||
"summary": "Get Purchase Price Statistics",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -339,7 +342,7 @@
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "Get All Items",
|
||||
"summary": "Query All Items",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -401,7 +404,7 @@
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "Create a new item",
|
||||
"summary": "Create Item",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Item Data",
|
||||
|
@ -433,7 +436,7 @@
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "exports items into the database",
|
||||
"summary": "Export Items",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "text/csv",
|
||||
|
@ -457,7 +460,7 @@
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "imports items into the database",
|
||||
"summary": "Get All Custom Field Names",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -484,7 +487,7 @@
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "imports items into the database",
|
||||
"summary": "Get All Custom Field Values",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -511,7 +514,7 @@
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "imports items into the database",
|
||||
"summary": "Import Items",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "file",
|
||||
|
@ -541,7 +544,7 @@
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "Gets a item and fields",
|
||||
"summary": "Get Item",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -572,7 +575,7 @@
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "updates a item",
|
||||
"summary": "Update Item",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -612,7 +615,7 @@
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "deletes a item",
|
||||
"summary": "Delete Item",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -642,7 +645,7 @@
|
|||
"tags": [
|
||||
"Items Attachments"
|
||||
],
|
||||
"summary": "imports items into the database",
|
||||
"summary": "Create Item Attachment",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -702,7 +705,7 @@
|
|||
"tags": [
|
||||
"Items Attachments"
|
||||
],
|
||||
"summary": "retrieves an attachment for an item",
|
||||
"summary": "Get Item Attachment",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -737,7 +740,7 @@
|
|||
"tags": [
|
||||
"Items Attachments"
|
||||
],
|
||||
"summary": "retrieves an attachment for an item",
|
||||
"summary": "Update Item Attachment",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -781,7 +784,7 @@
|
|||
"tags": [
|
||||
"Items Attachments"
|
||||
],
|
||||
"summary": "retrieves an attachment for an item",
|
||||
"summary": "Delete Item Attachment",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -966,7 +969,7 @@
|
|||
"tags": [
|
||||
"Labels"
|
||||
],
|
||||
"summary": "Create a new label",
|
||||
"summary": "Create Label",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Label Data",
|
||||
|
@ -1001,7 +1004,7 @@
|
|||
"tags": [
|
||||
"Labels"
|
||||
],
|
||||
"summary": "Gets a label and fields",
|
||||
"summary": "Get Label",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1032,7 +1035,7 @@
|
|||
"tags": [
|
||||
"Labels"
|
||||
],
|
||||
"summary": "updates a label",
|
||||
"summary": "Update Label",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1063,7 +1066,7 @@
|
|||
"tags": [
|
||||
"Labels"
|
||||
],
|
||||
"summary": "deletes a label",
|
||||
"summary": "Delete Label",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1138,7 +1141,7 @@
|
|||
"tags": [
|
||||
"Locations"
|
||||
],
|
||||
"summary": "Create a new location",
|
||||
"summary": "Create Location",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Location Data",
|
||||
|
@ -1173,7 +1176,7 @@
|
|||
"tags": [
|
||||
"Locations"
|
||||
],
|
||||
"summary": "Get All Locations",
|
||||
"summary": "Get Locations Tree",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "boolean",
|
||||
|
@ -1220,7 +1223,7 @@
|
|||
"tags": [
|
||||
"Locations"
|
||||
],
|
||||
"summary": "Gets a location and fields",
|
||||
"summary": "Get Location",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1251,7 +1254,7 @@
|
|||
"tags": [
|
||||
"Locations"
|
||||
],
|
||||
"summary": "updates a location",
|
||||
"summary": "Update Location",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1291,7 +1294,7 @@
|
|||
"tags": [
|
||||
"Locations"
|
||||
],
|
||||
"summary": "deletes a location",
|
||||
"summary": "Delete Location",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1321,7 +1324,7 @@
|
|||
"tags": [
|
||||
"Notifiers"
|
||||
],
|
||||
"summary": "Get All notifier",
|
||||
"summary": "Get Notifiers",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -1358,7 +1361,7 @@
|
|||
"tags": [
|
||||
"Notifiers"
|
||||
],
|
||||
"summary": "Create a new notifier",
|
||||
"summary": "Create Notifier",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Notifier Data",
|
||||
|
@ -1393,7 +1396,7 @@
|
|||
"tags": [
|
||||
"Notifiers"
|
||||
],
|
||||
"summary": "Test notifier",
|
||||
"summary": "Test Notifier",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1427,7 +1430,7 @@
|
|||
"tags": [
|
||||
"Notifiers"
|
||||
],
|
||||
"summary": "Update a notifier",
|
||||
"summary": "Update Notifier",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1464,7 +1467,7 @@
|
|||
"tags": [
|
||||
"Notifiers"
|
||||
],
|
||||
"summary": "Delete a notifier",
|
||||
"summary": "Delete a Notifier",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1494,7 +1497,7 @@
|
|||
"tags": [
|
||||
"Items"
|
||||
],
|
||||
"summary": "Encode data into QRCode",
|
||||
"summary": "Create QR Code",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -1526,7 +1529,7 @@
|
|||
"tags": [
|
||||
"Reporting"
|
||||
],
|
||||
"summary": "Generates a Bill of Materials CSV",
|
||||
"summary": "Export Bill of Materials",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "text/csv",
|
||||
|
@ -1545,7 +1548,7 @@
|
|||
"tags": [
|
||||
"Base"
|
||||
],
|
||||
"summary": "Retrieves the basic information about the API",
|
||||
"summary": "Application Info",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -1566,7 +1569,7 @@
|
|||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Updates the users password",
|
||||
"summary": "Change Password",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Password Payload",
|
||||
|
@ -1669,7 +1672,7 @@
|
|||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Get the current user",
|
||||
"summary": "Register New User",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "User Data",
|
||||
|
@ -1701,7 +1704,7 @@
|
|||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Get the current user",
|
||||
"summary": "Get User Self",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
|
@ -1735,7 +1738,7 @@
|
|||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Update the current user",
|
||||
"summary": "Update Account",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "User Data",
|
||||
|
@ -1780,7 +1783,7 @@
|
|||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Deletes the user account",
|
||||
"summary": "Delete Account",
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
|
|
|
@ -685,16 +685,15 @@ definitions:
|
|||
info:
|
||||
contact:
|
||||
name: Don't
|
||||
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!.
|
||||
description: Track, Manage, and Organize your Shit.
|
||||
license:
|
||||
name: MIT
|
||||
title: Go API Templates
|
||||
title: Homebox API
|
||||
version: "1.0"
|
||||
paths:
|
||||
/v1/actions/ensure-asset-ids:
|
||||
post:
|
||||
description: Ensures all items in the database have an asset ID
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
@ -704,11 +703,12 @@ paths:
|
|||
$ref: '#/definitions/v1.ActionAmountResult'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Ensures all items in the database have an asset id
|
||||
summary: Ensure Asset IDs
|
||||
tags:
|
||||
- Group
|
||||
- Actions
|
||||
/v1/actions/ensure-import-refs:
|
||||
post:
|
||||
description: Ensures all items in the database have an import ref
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
@ -718,11 +718,12 @@ paths:
|
|||
$ref: '#/definitions/v1.ActionAmountResult'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Ensures all items in the database have an import ref
|
||||
summary: Ensures Import Refs
|
||||
tags:
|
||||
- Group
|
||||
- Actions
|
||||
/v1/actions/zero-item-time-fields:
|
||||
post:
|
||||
description: Resets all item date fields to the beginning of the day
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
@ -732,9 +733,9 @@ paths:
|
|||
$ref: '#/definitions/v1.ActionAmountResult'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Resets all item date fields to the beginning of the day
|
||||
summary: Zero Out Time Fields
|
||||
tags:
|
||||
- Group
|
||||
- Actions
|
||||
/v1/assets/{id}:
|
||||
get:
|
||||
parameters:
|
||||
|
@ -752,9 +753,9 @@ paths:
|
|||
$ref: '#/definitions/repo.PaginationResult-repo_ItemSummary'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Gets an item by Asset ID
|
||||
summary: Get Item by Asset ID
|
||||
tags:
|
||||
- Assets
|
||||
- Items
|
||||
/v1/groups:
|
||||
get:
|
||||
produces:
|
||||
|
@ -766,7 +767,7 @@ paths:
|
|||
$ref: '#/definitions/repo.Group'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get the current user's group
|
||||
summary: Get Group
|
||||
tags:
|
||||
- Group
|
||||
put:
|
||||
|
@ -786,7 +787,7 @@ paths:
|
|||
$ref: '#/definitions/repo.Group'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Updates some fields of the current users group
|
||||
summary: Update Group
|
||||
tags:
|
||||
- Group
|
||||
/v1/groups/invitations:
|
||||
|
@ -807,7 +808,7 @@ paths:
|
|||
$ref: '#/definitions/v1.GroupInvitation'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get the current user
|
||||
summary: Create Group Invitation
|
||||
tags:
|
||||
- Group
|
||||
/v1/groups/statistics:
|
||||
|
@ -821,7 +822,7 @@ paths:
|
|||
$ref: '#/definitions/repo.GroupStatistics'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get the current user's group statistics
|
||||
summary: Get Group Statistics
|
||||
tags:
|
||||
- Statistics
|
||||
/v1/groups/statistics/labels:
|
||||
|
@ -837,7 +838,7 @@ paths:
|
|||
type: array
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get the current user's group statistics
|
||||
summary: Get Label Statistics
|
||||
tags:
|
||||
- Statistics
|
||||
/v1/groups/statistics/locations:
|
||||
|
@ -853,7 +854,7 @@ paths:
|
|||
type: array
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get the current user's group statistics
|
||||
summary: Get Location Statistics
|
||||
tags:
|
||||
- Statistics
|
||||
/v1/groups/statistics/purchase-price:
|
||||
|
@ -876,7 +877,7 @@ paths:
|
|||
$ref: '#/definitions/repo.ValueOverTime'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Queries the changes overtime of the purchase price over time
|
||||
summary: Get Purchase Price Statistics
|
||||
tags:
|
||||
- Statistics
|
||||
/v1/items:
|
||||
|
@ -917,7 +918,7 @@ paths:
|
|||
$ref: '#/definitions/repo.PaginationResult-repo_ItemSummary'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get All Items
|
||||
summary: Query All Items
|
||||
tags:
|
||||
- Items
|
||||
post:
|
||||
|
@ -937,7 +938,7 @@ paths:
|
|||
$ref: '#/definitions/repo.ItemSummary'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Create a new item
|
||||
summary: Create Item
|
||||
tags:
|
||||
- Items
|
||||
/v1/items/{id}:
|
||||
|
@ -955,7 +956,7 @@ paths:
|
|||
description: No Content
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: deletes a item
|
||||
summary: Delete Item
|
||||
tags:
|
||||
- Items
|
||||
get:
|
||||
|
@ -974,7 +975,7 @@ paths:
|
|||
$ref: '#/definitions/repo.ItemOut'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Gets a item and fields
|
||||
summary: Get Item
|
||||
tags:
|
||||
- Items
|
||||
put:
|
||||
|
@ -999,7 +1000,7 @@ paths:
|
|||
$ref: '#/definitions/repo.ItemOut'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: updates a item
|
||||
summary: Update Item
|
||||
tags:
|
||||
- Items
|
||||
/v1/items/{id}/attachments:
|
||||
|
@ -1038,7 +1039,7 @@ paths:
|
|||
$ref: '#/definitions/server.ErrorResponse'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: imports items into the database
|
||||
summary: Create Item Attachment
|
||||
tags:
|
||||
- Items Attachments
|
||||
/v1/items/{id}/attachments/{attachment_id}:
|
||||
|
@ -1059,7 +1060,7 @@ paths:
|
|||
description: No Content
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: retrieves an attachment for an item
|
||||
summary: Delete Item Attachment
|
||||
tags:
|
||||
- Items Attachments
|
||||
get:
|
||||
|
@ -1083,7 +1084,7 @@ paths:
|
|||
$ref: '#/definitions/v1.ItemAttachmentToken'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: retrieves an attachment for an item
|
||||
summary: Get Item Attachment
|
||||
tags:
|
||||
- Items Attachments
|
||||
put:
|
||||
|
@ -1111,7 +1112,7 @@ paths:
|
|||
$ref: '#/definitions/repo.ItemOut'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: retrieves an attachment for an item
|
||||
summary: Update Item Attachment
|
||||
tags:
|
||||
- Items Attachments
|
||||
/v1/items/{id}/maintenance:
|
||||
|
@ -1189,7 +1190,7 @@ paths:
|
|||
type: string
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: exports items into the database
|
||||
summary: Export Items
|
||||
tags:
|
||||
- Items
|
||||
/v1/items/fields:
|
||||
|
@ -1205,7 +1206,7 @@ paths:
|
|||
type: array
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: imports items into the database
|
||||
summary: Get All Custom Field Names
|
||||
tags:
|
||||
- Items
|
||||
/v1/items/fields/values:
|
||||
|
@ -1221,7 +1222,7 @@ paths:
|
|||
type: array
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: imports items into the database
|
||||
summary: Get All Custom Field Values
|
||||
tags:
|
||||
- Items
|
||||
/v1/items/import:
|
||||
|
@ -1239,7 +1240,7 @@ paths:
|
|||
description: No Content
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: imports items into the database
|
||||
summary: Import Items
|
||||
tags:
|
||||
- Items
|
||||
/v1/labels:
|
||||
|
@ -1280,7 +1281,7 @@ paths:
|
|||
$ref: '#/definitions/repo.LabelSummary'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Create a new label
|
||||
summary: Create Label
|
||||
tags:
|
||||
- Labels
|
||||
/v1/labels/{id}:
|
||||
|
@ -1298,7 +1299,7 @@ paths:
|
|||
description: No Content
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: deletes a label
|
||||
summary: Delete Label
|
||||
tags:
|
||||
- Labels
|
||||
get:
|
||||
|
@ -1317,7 +1318,7 @@ paths:
|
|||
$ref: '#/definitions/repo.LabelOut'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Gets a label and fields
|
||||
summary: Get Label
|
||||
tags:
|
||||
- Labels
|
||||
put:
|
||||
|
@ -1336,7 +1337,7 @@ paths:
|
|||
$ref: '#/definitions/repo.LabelOut'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: updates a label
|
||||
summary: Update Label
|
||||
tags:
|
||||
- Labels
|
||||
/v1/locations:
|
||||
|
@ -1382,7 +1383,7 @@ paths:
|
|||
$ref: '#/definitions/repo.LocationSummary'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Create a new location
|
||||
summary: Create Location
|
||||
tags:
|
||||
- Locations
|
||||
/v1/locations/{id}:
|
||||
|
@ -1400,7 +1401,7 @@ paths:
|
|||
description: No Content
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: deletes a location
|
||||
summary: Delete Location
|
||||
tags:
|
||||
- Locations
|
||||
get:
|
||||
|
@ -1419,7 +1420,7 @@ paths:
|
|||
$ref: '#/definitions/repo.LocationOut'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Gets a location and fields
|
||||
summary: Get Location
|
||||
tags:
|
||||
- Locations
|
||||
put:
|
||||
|
@ -1444,7 +1445,7 @@ paths:
|
|||
$ref: '#/definitions/repo.LocationOut'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: updates a location
|
||||
summary: Update Location
|
||||
tags:
|
||||
- Locations
|
||||
/v1/locations/tree:
|
||||
|
@ -1470,7 +1471,7 @@ paths:
|
|||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get All Locations
|
||||
summary: Get Locations Tree
|
||||
tags:
|
||||
- Locations
|
||||
/v1/notifiers:
|
||||
|
@ -1491,7 +1492,7 @@ paths:
|
|||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get All notifier
|
||||
summary: Get Notifiers
|
||||
tags:
|
||||
- Notifiers
|
||||
post:
|
||||
|
@ -1511,7 +1512,7 @@ paths:
|
|||
$ref: '#/definitions/repo.NotifierOut'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Create a new notifier
|
||||
summary: Create Notifier
|
||||
tags:
|
||||
- Notifiers
|
||||
/v1/notifiers/{id}:
|
||||
|
@ -1527,7 +1528,7 @@ paths:
|
|||
description: No Content
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Delete a notifier
|
||||
summary: Delete a Notifier
|
||||
tags:
|
||||
- Notifiers
|
||||
put:
|
||||
|
@ -1550,7 +1551,7 @@ paths:
|
|||
$ref: '#/definitions/repo.NotifierOut'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Update a notifier
|
||||
summary: Update Notifier
|
||||
tags:
|
||||
- Notifiers
|
||||
/v1/notifiers/test:
|
||||
|
@ -1573,7 +1574,7 @@ paths:
|
|||
description: No Content
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Test notifier
|
||||
summary: Test Notifier
|
||||
tags:
|
||||
- Notifiers
|
||||
/v1/qrcode:
|
||||
|
@ -1592,7 +1593,7 @@ paths:
|
|||
type: string
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Encode data into QRCode
|
||||
summary: Create QR Code
|
||||
tags:
|
||||
- Items
|
||||
/v1/reporting/bill-of-materials:
|
||||
|
@ -1606,7 +1607,7 @@ paths:
|
|||
type: string
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Generates a Bill of Materials CSV
|
||||
summary: Export Bill of Materials
|
||||
tags:
|
||||
- Reporting
|
||||
/v1/status:
|
||||
|
@ -1618,7 +1619,7 @@ paths:
|
|||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/v1.ApiSummary'
|
||||
summary: Retrieves the basic information about the API
|
||||
summary: Application Info
|
||||
tags:
|
||||
- Base
|
||||
/v1/users/change-password:
|
||||
|
@ -1635,7 +1636,7 @@ paths:
|
|||
description: No Content
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Updates the users password
|
||||
summary: Change Password
|
||||
tags:
|
||||
- User
|
||||
/v1/users/login:
|
||||
|
@ -1701,7 +1702,7 @@ paths:
|
|||
responses:
|
||||
"204":
|
||||
description: No Content
|
||||
summary: Get the current user
|
||||
summary: Register New User
|
||||
tags:
|
||||
- User
|
||||
/v1/users/self:
|
||||
|
@ -1713,7 +1714,7 @@ paths:
|
|||
description: No Content
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Deletes the user account
|
||||
summary: Delete Account
|
||||
tags:
|
||||
- User
|
||||
get:
|
||||
|
@ -1731,7 +1732,7 @@ paths:
|
|||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get the current user
|
||||
summary: Get User Self
|
||||
tags:
|
||||
- User
|
||||
put:
|
||||
|
@ -1756,7 +1757,7 @@ paths:
|
|||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Update the current user
|
||||
summary: Update Account
|
||||
tags:
|
||||
- User
|
||||
securityDefinitions:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue