Files
warehouse-management-BE/docs/swagger/swagger.yaml

3459 lines
87 KiB
YAML

basePath: /api/v1
definitions:
models.AbnormalAlert:
properties:
count:
type: integer
status:
type: string
type: object
models.AlternativeComponent:
properties:
alternativeComponentId:
type: integer
conversionRatio:
type: string
id:
type: integer
invoiceConfigItemId:
type: integer
metadata:
items:
type: integer
type: array
note:
type: string
priority:
type: integer
type: object
models.Cabinet:
properties:
createdAt:
type: string
description:
type: string
id:
type: integer
name:
type: string
roomId:
type: integer
updatedAt:
type: string
type: object
models.Component:
properties:
componentTypeId:
type: integer
createdAt:
type: string
description:
type: string
id:
type: integer
metadata:
items:
type: integer
type: array
minQuantity:
type: integer
name:
type: string
totalQuantity:
type: integer
unit:
type: string
updatedAt:
type: string
type: object
models.ComponentCode:
properties:
code:
type: string
codeType:
type: string
componentId:
type: integer
createdAt:
type: string
id:
type: integer
isPrimary:
type: boolean
metadata:
items:
type: integer
type: array
type: object
models.ComponentItem:
properties:
componentId:
type: integer
containerId:
type: integer
createdAt:
type: string
id:
type: integer
metadata:
items:
type: integer
type: array
quantity:
type: integer
status:
type: string
updatedAt:
type: string
type: object
models.ComponentType:
properties:
createdAt:
type: string
description:
type: string
id:
type: integer
metadata:
items:
type: integer
type: array
name:
type: string
updatedAt:
type: string
type: object
models.Container:
properties:
containerType:
type: string
createdAt:
type: string
description:
type: string
id:
type: integer
maxCapacity:
type: integer
metadata:
items:
type: integer
type: array
name:
type: string
shelfId:
type: integer
updatedAt:
type: string
type: object
models.ContainerStats:
properties:
emptyContainers:
type: integer
totalContainers:
type: integer
type: object
models.DashboardSummary:
properties:
abnormalAlerts:
items:
$ref: '#/definitions/models.AbnormalAlert'
type: array
emptyContainers:
$ref: '#/definitions/models.ContainerStats'
lowStockComponents:
type: integer
pendingInvoices:
type: integer
todayInvoices:
items:
$ref: '#/definitions/models.TodayInvoiceCount'
type: array
totalComponents:
$ref: '#/definitions/models.TotalComponentStats'
type: object
models.FindComponentItemResult:
properties:
cabinetName:
type: string
componentName:
type: string
containerName:
type: string
containerType:
type: string
quantity:
type: integer
roomName:
type: string
shelfName:
type: string
status:
type: string
typeName:
type: string
warehouseName:
type: string
type: object
models.Invoice:
properties:
approvedBy:
type: string
completedAt:
type: string
createdAt:
type: string
createdBy:
type: string
id:
type: integer
invoiceCode:
type: string
invoiceConfigId:
type: integer
metadata:
items:
type: integer
type: array
note:
type: string
status:
type: string
totalItems:
type: integer
type:
type: string
updatedAt:
type: string
type: object
models.InvoiceConfig:
properties:
createdAt:
type: string
description:
type: string
id:
type: integer
isActive:
type: boolean
metadata:
items:
type: integer
type: array
name:
type: string
type:
type: string
updatedAt:
type: string
type: object
models.InvoiceConfigItem:
properties:
allowAlternative:
type: boolean
componentId:
type: integer
id:
type: integer
invoiceConfigId:
type: integer
metadata:
items:
type: integer
type: array
note:
type: string
priorityOrder:
type: integer
requiredQuantity:
type: integer
type: object
models.Room:
properties:
createdAt:
type: string
description:
type: string
id:
type: integer
name:
type: string
updatedAt:
type: string
warehouseId:
type: integer
type: object
models.Shelve:
properties:
cabinetId:
type: integer
createdAt:
type: string
description:
type: string
id:
type: integer
levelIndex:
type: integer
name:
type: string
updatedAt:
type: string
type: object
models.TodayInvoiceCount:
properties:
count:
type: integer
type:
type: string
type: object
models.TotalComponentStats:
properties:
totalQuantity:
type: integer
totalTypes:
type: integer
type: object
models.Warehouse:
properties:
address:
type: string
createdAt:
type: string
description:
type: string
id:
type: integer
name:
type: string
updatedAt:
type: string
type: object
requests.BodyRegisterRequest:
properties:
email:
type: string
fullName:
type: string
password:
minLength: 8
type: string
username:
type: string
required:
- email
- password
- username
type: object
requests.CreateAlternativeComponentRequest:
properties:
alternativeComponentId:
type: integer
conversionRatio:
type: string
invoiceConfigItemId:
type: integer
note:
type: string
priority:
type: integer
required:
- alternativeComponentId
- conversionRatio
- invoiceConfigItemId
- priority
type: object
requests.CreateCabinetRequest:
properties:
description:
type: string
name:
type: string
roomId:
type: integer
required:
- name
- roomId
type: object
requests.CreateComponentCodeRequest:
properties:
code:
type: string
codeType:
type: string
componentId:
type: integer
isPrimary:
type: boolean
metadata:
items:
type: integer
type: array
required:
- code
- componentId
type: object
requests.CreateComponentItemRequest:
properties:
componentId:
type: integer
containerId:
type: integer
metadata:
items:
type: integer
type: array
quantity:
type: integer
status:
type: string
required:
- componentId
- containerId
- quantity
- status
type: object
requests.CreateComponentRequest:
properties:
componentTypeId:
type: integer
description:
type: string
metadata:
items:
type: integer
type: array
minQuantity:
type: integer
name:
type: string
unit:
type: string
required:
- componentTypeId
- minQuantity
- name
- unit
type: object
requests.CreateComponentTypeRequest:
properties:
description:
type: string
metadata:
items:
type: integer
type: array
name:
type: string
required:
- name
type: object
requests.CreateContainerRequest:
properties:
containerType:
type: string
description:
type: string
maxCapacity:
type: integer
metadata:
items:
type: integer
type: array
name:
type: string
shelfId:
type: integer
required:
- containerType
- name
- shelfId
type: object
requests.CreateInvoiceConfigItemRequest:
properties:
allowAlternative:
type: boolean
componentId:
type: integer
invoiceConfigId:
type: integer
note:
type: string
priorityOrder:
type: integer
requiredQuantity:
type: integer
required:
- componentId
- invoiceConfigId
- priorityOrder
- requiredQuantity
type: object
requests.CreateInvoiceConfigRequest:
properties:
description:
type: string
isActive:
type: boolean
name:
type: string
type:
type: string
required:
- name
- type
type: object
requests.CreateInvoiceRequest:
properties:
approvedBy:
type: string
createdBy:
type: string
invoiceConfigId:
type: integer
note:
type: string
status:
type: string
totalItems:
type: integer
type:
type: string
required:
- status
- type
type: object
requests.CreateRoomRequest:
properties:
description:
type: string
name:
type: string
warehouseId:
type: integer
required:
- name
- warehouseId
type: object
requests.CreateShelveRequest:
properties:
cabinetId:
type: integer
description:
type: string
levelIndex:
type: integer
name:
type: string
required:
- cabinetId
- levelIndex
- name
type: object
requests.CreateWarehouseRequest:
properties:
address:
type: string
description:
type: string
name:
type: string
required:
- address
- name
type: object
requests.UpdateAlternativeComponentRequest:
properties:
alternativeComponentId:
type: integer
conversionRatio:
type: string
invoiceConfigItemId:
type: integer
note:
type: string
priority:
type: integer
type: object
requests.UpdateCabinetRequest:
properties:
description:
type: string
name:
type: string
type: object
requests.UpdateComponentCodeRequest:
properties:
code:
type: string
codeType:
type: string
componentId:
type: integer
isPrimary:
type: boolean
metadata:
items:
type: integer
type: array
type: object
requests.UpdateComponentItemRequest:
properties:
componentId:
type: integer
containerId:
type: integer
metadata:
items:
type: integer
type: array
type: object
requests.UpdateComponentItemStatusRequest:
properties:
changedQuantity:
type: integer
note:
type: string
status:
enum:
- normal
- damaged
- long_unused
- expired
- pending_inspection
type: string
required:
- status
type: object
requests.UpdateComponentRequest:
properties:
componentTypeId:
type: integer
description:
type: string
metadata:
items:
type: integer
type: array
minQuantity:
type: integer
name:
type: string
unit:
type: string
type: object
requests.UpdateComponentTypeRequest:
properties:
description:
type: string
metadata:
items:
type: integer
type: array
name:
type: string
type: object
requests.UpdateContainerRequest:
properties:
containerType:
type: string
description:
type: string
maxCapacity:
type: integer
metadata:
items:
type: integer
type: array
name:
type: string
type: object
requests.UpdateInvoiceConfigItemRequest:
properties:
allowAlternative:
type: boolean
note:
type: string
priorityOrder:
type: integer
requiredQuantity:
type: integer
type: object
requests.UpdateInvoiceConfigRequest:
properties:
description:
type: string
isActive:
type: boolean
name:
type: string
type:
type: string
type: object
requests.UpdateInvoiceRequest:
properties:
invoiceConfigId:
type: integer
note:
type: string
status:
type: string
totalItems:
type: integer
type:
type: string
type: object
requests.UpdateRoomRequest:
properties:
description:
type: string
name:
type: string
type: object
requests.UpdateShelveRequest:
properties:
description:
type: string
levelIndex:
type: integer
name:
type: string
type: object
requests.UpdateWarehouseRequest:
properties:
address:
type: string
description:
type: string
name:
type: string
type: object
response.ErrorResponse:
properties:
code:
type: integer
message:
type: string
now:
type: integer
status:
type: integer
type: object
response.SuccessResponse:
properties:
data: {}
message:
type: string
option: {}
reason_status_code:
type: string
status:
type: integer
type: object
responses.BodyProfileResponse:
properties:
info:
$ref: '#/definitions/responses.UserInfoResponse'
permissions:
items:
type: string
type: array
roles:
items:
$ref: '#/definitions/responses.RoleItem'
type: array
type: object
responses.BodyRegisterResponse:
properties:
id:
type: string
type: object
responses.CreateAlternativeComponentResponse:
properties:
id:
type: integer
type: object
responses.CreateCabinetResponse:
properties:
id:
type: integer
type: object
responses.CreateComponentCodeResponse:
properties:
id:
type: integer
type: object
responses.CreateComponentItemResponse:
properties:
id:
type: integer
type: object
responses.CreateComponentResponse:
properties:
id:
type: integer
type: object
responses.CreateComponentTypeResponse:
properties:
id:
type: integer
type: object
responses.CreateContainerResponse:
properties:
id:
type: integer
type: object
responses.CreateInvoiceConfigItemResponse:
properties:
id:
type: integer
type: object
responses.CreateInvoiceConfigResponse:
properties:
id:
type: integer
type: object
responses.CreateInvoiceResponse:
properties:
id:
type: integer
invoiceCode:
type: string
type: object
responses.CreateRoomResponse:
properties:
id:
type: integer
type: object
responses.CreateShelveResponse:
properties:
id:
type: integer
type: object
responses.CreateWarehouseResponse:
properties:
id:
type: integer
type: object
responses.RoleItem:
properties:
description:
type: string
id:
type: string
name:
type: string
type: object
responses.UpdateAlternativeComponentResponse:
properties:
alternativeComponentId:
type: integer
conversionRatio:
type: string
id:
type: integer
invoiceConfigItemId:
type: integer
note:
type: string
priority:
type: integer
type: object
responses.UpdateCabinetResponse:
properties:
description:
type: string
id:
type: integer
name:
type: string
roomId:
type: integer
type: object
responses.UpdateComponentCodeResponse:
properties:
code:
type: string
codeType:
type: string
componentId:
type: integer
id:
type: integer
isPrimary:
type: boolean
type: object
responses.UpdateComponentItemResponse:
properties:
componentId:
type: integer
containerId:
type: integer
id:
type: integer
metadata:
items:
type: integer
type: array
quantity:
type: integer
status:
type: string
type: object
responses.UpdateComponentItemStatusResponse:
properties:
changedQuantity:
type: integer
historyId:
type: integer
id:
type: integer
mergedComponentItemId:
type: integer
newComponentItemId:
type: integer
newStatus:
type: string
oldStatus:
type: string
type: object
responses.UpdateComponentResponse:
properties:
componentTypeId:
type: integer
description:
type: string
id:
type: integer
minQuantity:
type: integer
name:
type: string
unit:
type: string
type: object
responses.UpdateComponentTypeResponse:
properties:
description:
type: string
id:
type: integer
name:
type: string
type: object
responses.UpdateContainerResponse:
properties:
containerType:
type: string
description:
type: string
id:
type: integer
maxCapacity:
type: integer
metadata:
items:
type: integer
type: array
name:
type: string
shelfId:
type: integer
type: object
responses.UpdateInvoiceConfigItemResponse:
properties:
allowAlternative:
type: boolean
componentId:
type: integer
id:
type: integer
invoiceConfigId:
type: integer
note:
type: string
priorityOrder:
type: integer
requiredQuantity:
type: integer
type: object
responses.UpdateInvoiceConfigResponse:
properties:
description:
type: string
id:
type: integer
isActive:
type: boolean
name:
type: string
type:
type: string
type: object
responses.UpdateInvoiceResponse:
properties:
id:
type: integer
invoiceCode:
type: string
invoiceConfigId:
type: integer
note:
type: string
status:
type: string
totalItems:
type: integer
type:
type: string
type: object
responses.UpdateRoomResponse:
properties:
description:
type: string
id:
type: integer
name:
type: string
warehouseId:
type: integer
type: object
responses.UpdateShelveResponse:
properties:
cabinetId:
type: integer
description:
type: string
id:
type: integer
levelIndex:
type: integer
name:
type: string
type: object
responses.UpdateWarehouseResponse:
properties:
address:
type: string
description:
type: string
id:
type: integer
name:
type: string
type: object
responses.UserInfoResponse:
properties:
email:
type: string
fullName:
type: string
id:
type: string
isActive:
type: boolean
username:
type: string
type: object
host: localhost:3000
info:
contact: {}
description: This is the Warehouse Management API server.
title: Warehouse Management API
version: "1.0"
paths:
/api/v1/component-codes:
get:
consumes:
- application/json
description: Retrieve a list of all component codes ordered by creation date
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.ComponentCode'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all component codes
tags:
- component-code
post:
consumes:
- application/json
description: Create a new component code with the provided details
parameters:
- description: Component code request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateComponentCodeRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateComponentCodeResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new component code
tags:
- component-code
/api/v1/component-codes/{id}:
delete:
consumes:
- application/json
description: Delete a component code by its unique identifier
parameters:
- description: Component code ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete component code
tags:
- component-code
get:
consumes:
- application/json
description: Retrieve a single component code using its unique identifier
parameters:
- description: Component code ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.ComponentCode'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get component code by ID
tags:
- component-code
put:
consumes:
- application/json
description: Update an existing component code by its ID. Only non-empty fields
will be updated.
parameters:
- description: Component code ID
in: path
name: id
required: true
type: integer
- description: Component code request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateComponentCodeRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateComponentCodeResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update component code
tags:
- component-code
/api/v1/component-items:
get:
consumes:
- application/json
description: Retrieve a list of all component items ordered by creation date
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.ComponentItem'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all component items
tags:
- component-item
post:
consumes:
- application/json
description: Create a new component item with the provided details
parameters:
- description: Component item request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateComponentItemRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateComponentItemResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new component item
tags:
- component-item
/api/v1/component-items/{id}:
delete:
consumes:
- application/json
description: Delete a component item by its unique identifier
parameters:
- description: Component item ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete component item
tags:
- component-item
get:
consumes:
- application/json
description: Retrieve a single component item using its unique identifier
parameters:
- description: Component item ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.ComponentItem'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get component item by ID
tags:
- component-item
put:
consumes:
- application/json
description: Update an existing component item by its ID. Only non-empty fields
will be updated.
parameters:
- description: Component item ID
in: path
name: id
required: true
type: integer
- description: Component item request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateComponentItemRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateComponentItemResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update component item
tags:
- component-item
/api/v1/component-items/{id}/status:
put:
consumes:
- application/json
description: Change the status of a component item. Supports partial quantity
change with automatic split/merge logic. A status history record is created
automatically.
parameters:
- description: Component item ID
in: path
name: id
required: true
type: integer
- description: Status change request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateComponentItemStatusRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateComponentItemStatusResponse'
type: object
"400":
description: Validation error (e.g., changed_quantity > quantity, status
unchanged)
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Component item not found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Change component item status
tags:
- component-item
/api/v1/component-items/find/{componentId}:
get:
consumes:
- application/json
description: Retrieve component items with full location details (container,
shelf, cabinet, room, warehouse) for a given component ID
parameters:
- description: Component ID
in: path
name: componentId
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.FindComponentItemResult'
type: array
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Find component items by component ID
tags:
- component-item
/api/v1/component-types:
get:
consumes:
- application/json
description: Retrieve a list of all component types ordered by creation date
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.ComponentType'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all component types
tags:
- component-type
post:
consumes:
- application/json
description: Create a new component type with the provided details
parameters:
- description: Component type request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateComponentTypeRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateComponentTypeResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new component type
tags:
- component-type
/api/v1/component-types/{id}:
delete:
consumes:
- application/json
description: Delete a component type by its unique identifier
parameters:
- description: Component type ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete component type
tags:
- component-type
get:
consumes:
- application/json
description: Retrieve a single component type using its unique identifier
parameters:
- description: Component type ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.ComponentType'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get component type by ID
tags:
- component-type
put:
consumes:
- application/json
description: Update an existing component type by its ID. Only non-empty fields
will be updated.
parameters:
- description: Component type ID
in: path
name: id
required: true
type: integer
- description: Component type request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateComponentTypeRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateComponentTypeResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update component type
tags:
- component-type
/api/v1/components:
get:
consumes:
- application/json
description: Retrieve a list of all components ordered by creation date
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.Component'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all components
tags:
- component
post:
consumes:
- application/json
description: Create a new component with the provided details
parameters:
- description: Component request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateComponentRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateComponentResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new component
tags:
- component
/api/v1/components/{id}:
delete:
consumes:
- application/json
description: Delete a component by its unique identifier
parameters:
- description: Component ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete component
tags:
- component
get:
consumes:
- application/json
description: Retrieve a single component using its unique identifier
parameters:
- description: Component ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.Component'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get component by ID
tags:
- component
put:
consumes:
- application/json
description: Update an existing component by its ID. Only non-empty fields will
be updated.
parameters:
- description: Component ID
in: path
name: id
required: true
type: integer
- description: Component request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateComponentRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateComponentResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update component
tags:
- component
/auth/register:
post:
consumes:
- application/json
description: Register with email, username and password
parameters:
- description: Register request
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.BodyRegisterRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.BodyRegisterResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"409":
description: Conflict
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Register a new user
tags:
- auth
/ping:
get:
consumes:
- application/json
description: Check server is running
produces:
- application/json
responses:
"200":
description: OK
schema:
additionalProperties:
type: string
type: object
summary: Health check
tags:
- health
/profile:
get:
description: Returns user info with roles and permissions (requires auth)
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.BodyProfileResponse'
type: object
"401":
description: Unauthorized
schema:
$ref: '#/definitions/response.ErrorResponse'
security:
- BearerAuth: []
summary: Get current user profile
tags:
- auth
/v1/alternative-components:
get:
consumes:
- application/json
description: Retrieve a list of all alternative components
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.AlternativeComponent'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all alternative components
tags:
- alternative-component
post:
consumes:
- application/json
description: Create a new alternative component with the provided details
parameters:
- description: Alternative component request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateAlternativeComponentRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateAlternativeComponentResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new alternative component
tags:
- alternative-component
/v1/alternative-components/{id}:
delete:
consumes:
- application/json
description: Delete an alternative component by its unique identifier
parameters:
- description: Alternative component ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete alternative component
tags:
- alternative-component
get:
consumes:
- application/json
description: Retrieve a single alternative component using its unique identifier
parameters:
- description: Alternative component ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.AlternativeComponent'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get alternative component by ID
tags:
- alternative-component
put:
consumes:
- application/json
description: Update an existing alternative component by its ID. Only non-empty
fields will be updated.
parameters:
- description: Alternative component ID
in: path
name: id
required: true
type: integer
- description: Alternative component request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateAlternativeComponentRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateAlternativeComponentResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update alternative component
tags:
- alternative-component
/v1/cabinets:
get:
consumes:
- application/json
description: Retrieve a list of all cabinets ordered by creation date
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.Cabinet'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all cabinets
tags:
- cabinet
post:
consumes:
- application/json
description: Create a new cabinet with the provided details
parameters:
- description: Cabinet request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateCabinetRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateCabinetResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new cabinet
tags:
- cabinet
/v1/cabinets/{id}:
delete:
consumes:
- application/json
description: Delete a cabinet by its unique identifier
parameters:
- description: Cabinet ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete cabinet
tags:
- cabinet
get:
consumes:
- application/json
description: Retrieve a single cabinet using its unique identifier
parameters:
- description: Cabinet ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.Cabinet'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get cabinet by ID
tags:
- cabinet
put:
consumes:
- application/json
description: Update an existing cabinet by its ID. Only non-empty fields will
be updated.
parameters:
- description: Cabinet ID
in: path
name: id
required: true
type: integer
- description: Cabinet request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateCabinetRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateCabinetResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update cabinet
tags:
- cabinet
/v1/containers:
get:
consumes:
- application/json
description: Retrieve a list of all containers ordered by creation date
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.Container'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all containers
tags:
- container
post:
consumes:
- application/json
description: Create a new container with the provided details
parameters:
- description: Container request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateContainerRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateContainerResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new container
tags:
- container
/v1/containers/{id}:
delete:
consumes:
- application/json
description: Delete a container by its unique identifier
parameters:
- description: Container ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete container
tags:
- container
get:
consumes:
- application/json
description: Retrieve a single container using its unique identifier
parameters:
- description: Container ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.Container'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get container by ID
tags:
- container
put:
consumes:
- application/json
description: Update an existing container by its ID. Only non-empty fields will
be updated.
parameters:
- description: Container ID
in: path
name: id
required: true
type: integer
- description: Container request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateContainerRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateContainerResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update container
tags:
- container
/v1/dashboard/summary:
get:
consumes:
- application/json
description: Retrieve dashboard summary with key statistics
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.DashboardSummary'
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get dashboard summary
tags:
- dashboard
/v1/invoice-config-items:
get:
consumes:
- application/json
description: Retrieve a list of all invoice config items
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.InvoiceConfigItem'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all invoice config items
tags:
- invoice-config-item
post:
consumes:
- application/json
description: Create a new invoice config item with the provided details
parameters:
- description: Invoice config item request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateInvoiceConfigItemRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateInvoiceConfigItemResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new invoice config item
tags:
- invoice-config-item
/v1/invoice-config-items/{id}:
delete:
consumes:
- application/json
description: Delete an invoice config item by its unique identifier
parameters:
- description: Invoice config item ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete invoice config item
tags:
- invoice-config-item
get:
consumes:
- application/json
description: Retrieve a single invoice config item using its unique identifier
parameters:
- description: Invoice config item ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.InvoiceConfigItem'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get invoice config item by ID
tags:
- invoice-config-item
put:
consumes:
- application/json
description: Update an existing invoice config item by its ID. Only non-empty
fields will be updated.
parameters:
- description: Invoice config item ID
in: path
name: id
required: true
type: integer
- description: Invoice config item request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateInvoiceConfigItemRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateInvoiceConfigItemResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update invoice config item
tags:
- invoice-config-item
/v1/invoice-configs:
get:
consumes:
- application/json
description: Retrieve a list of all invoice configs ordered by creation date
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.InvoiceConfig'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all invoice configs
tags:
- invoice-config
post:
consumes:
- application/json
description: Create a new invoice config with the provided details
parameters:
- description: Invoice config request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateInvoiceConfigRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateInvoiceConfigResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new invoice config
tags:
- invoice-config
/v1/invoice-configs/{id}:
delete:
consumes:
- application/json
description: Delete an invoice config by its unique identifier
parameters:
- description: Invoice config ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete invoice config
tags:
- invoice-config
get:
consumes:
- application/json
description: Retrieve a single invoice config using its unique identifier
parameters:
- description: Invoice config ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.InvoiceConfig'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get invoice config by ID
tags:
- invoice-config
put:
consumes:
- application/json
description: Update an existing invoice config by its ID. Only non-empty fields
will be updated.
parameters:
- description: Invoice config ID
in: path
name: id
required: true
type: integer
- description: Invoice config request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateInvoiceConfigRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateInvoiceConfigResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update invoice config
tags:
- invoice-config
/v1/invoices:
get:
consumes:
- application/json
description: Retrieve a list of all invoices ordered by creation date
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.Invoice'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all invoices
tags:
- invoice
post:
consumes:
- application/json
description: Create a new invoice with the provided details
parameters:
- description: Invoice request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateInvoiceRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateInvoiceResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new invoice
tags:
- invoice
/v1/invoices/{id}:
delete:
consumes:
- application/json
description: Delete an invoice by its unique identifier
parameters:
- description: Invoice ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete invoice
tags:
- invoice
get:
consumes:
- application/json
description: Retrieve a single invoice using its unique identifier
parameters:
- description: Invoice ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.Invoice'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get invoice by ID
tags:
- invoice
put:
consumes:
- application/json
description: Update an existing invoice by its ID. Only non-empty fields will
be updated.
parameters:
- description: Invoice ID
in: path
name: id
required: true
type: integer
- description: Invoice request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateInvoiceRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateInvoiceResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update invoice
tags:
- invoice
/v1/rooms:
get:
consumes:
- application/json
description: Retrieve a list of all rooms ordered by creation date
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.Room'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all rooms
tags:
- room
post:
consumes:
- application/json
description: Create a new room with the provided details
parameters:
- description: Room request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateRoomRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateRoomResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new room
tags:
- room
/v1/rooms/{id}:
delete:
consumes:
- application/json
description: Delete a room by its unique identifier
parameters:
- description: Room ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete room
tags:
- room
get:
consumes:
- application/json
description: Retrieve a single room using its unique identifier
parameters:
- description: Room ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.Room'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get room by ID
tags:
- room
put:
consumes:
- application/json
description: Update an existing room by its ID. Only non-empty fields will be
updated.
parameters:
- description: Room ID
in: path
name: id
required: true
type: integer
- description: Room request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateRoomRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateRoomResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update room
tags:
- room
/v1/shelves:
get:
consumes:
- application/json
description: Retrieve a list of all shelves ordered by creation date
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.Shelve'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all shelves
tags:
- shelve
post:
consumes:
- application/json
description: Create a new shelve with the provided details
parameters:
- description: Shelve request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateShelveRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateShelveResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new shelve
tags:
- shelve
/v1/shelves/{id}:
delete:
consumes:
- application/json
description: Delete a shelve by its unique identifier
parameters:
- description: Shelve ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete shelve
tags:
- shelve
get:
consumes:
- application/json
description: Retrieve a single shelve using its unique identifier
parameters:
- description: Shelve ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.Shelve'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get shelve by ID
tags:
- shelve
put:
consumes:
- application/json
description: Update an existing shelve by its ID. Only non-empty fields will
be updated.
parameters:
- description: Shelve ID
in: path
name: id
required: true
type: integer
- description: Shelve request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateShelveRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateShelveResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update shelve
tags:
- shelve
/v1/warehouses:
get:
consumes:
- application/json
description: Retrieve a list of all warehouses ordered by creation date
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
items:
$ref: '#/definitions/models.Warehouse'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: List all warehouses
tags:
- warehouse
post:
consumes:
- application/json
description: Create a new warehouse with the provided details
parameters:
- description: Warehouse request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.CreateWarehouseRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.CreateWarehouseResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Create a new warehouse
tags:
- warehouse
/v1/warehouses/{id}:
delete:
consumes:
- application/json
description: Delete a warehouse by its unique identifier
parameters:
- description: Warehouse ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.SuccessResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Delete warehouse
tags:
- warehouse
get:
consumes:
- application/json
description: Retrieve a single warehouse using its unique identifier
parameters:
- description: Warehouse ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/models.Warehouse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Get warehouse by ID
tags:
- warehouse
put:
consumes:
- application/json
description: Update an existing warehouse by its ID with the provided details
parameters:
- description: Warehouse ID
in: path
name: id
required: true
type: integer
- description: Warehouse request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/requests.UpdateWarehouseRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.SuccessResponse'
- properties:
data:
$ref: '#/definitions/responses.UpdateWarehouseResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
summary: Update warehouse
tags:
- warehouse
swagger: "2.0"