new-g
This commit is contained in:
+321
-1
@@ -27,6 +27,68 @@ definitions:
|
||||
width:
|
||||
type: number
|
||||
type: object
|
||||
gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.LineStage:
|
||||
description: Этап производственной линии переработки
|
||||
properties:
|
||||
description:
|
||||
type: string
|
||||
equipment:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
mqtt_topic:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
order:
|
||||
type: integer
|
||||
type: object
|
||||
gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.LineStats:
|
||||
description: Сводная статистика работы производственной линии
|
||||
properties:
|
||||
avg_speed:
|
||||
type: number
|
||||
current_stage:
|
||||
type: string
|
||||
last_update_time:
|
||||
type: string
|
||||
rejected_items:
|
||||
type: integer
|
||||
status:
|
||||
type: string
|
||||
total_items:
|
||||
type: integer
|
||||
type: object
|
||||
gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.ProductionEvent:
|
||||
description: Событие, произошедшее на этапе производственной линии
|
||||
properties:
|
||||
data:
|
||||
type: string
|
||||
event_type:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
stage_id:
|
||||
type: integer
|
||||
timestamp:
|
||||
type: string
|
||||
type: object
|
||||
gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.SensorReading:
|
||||
description: Показание датчика на этапе линии
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
sensor:
|
||||
type: string
|
||||
stage_id:
|
||||
type: integer
|
||||
timestamp:
|
||||
type: string
|
||||
unit:
|
||||
type: string
|
||||
value:
|
||||
type: number
|
||||
type: object
|
||||
info:
|
||||
contact: {}
|
||||
paths:
|
||||
@@ -137,6 +199,27 @@ paths:
|
||||
summary: Обновить тип тюка
|
||||
tags:
|
||||
- bale-types
|
||||
/bale-types/qr/{id}:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Возвращает QR код с URL для регистрации тюка этого типа
|
||||
parameters:
|
||||
- description: ID типа тюка
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- image/png
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
type: file
|
||||
summary: Получить QR код для маркировки тюка
|
||||
tags:
|
||||
- bale-types
|
||||
/bales:
|
||||
get:
|
||||
consumes:
|
||||
@@ -162,9 +245,12 @@ paths:
|
||||
- description: Данные тюка
|
||||
in: body
|
||||
name: bale
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale'
|
||||
- description: Тип тюка (для QR кодов)
|
||||
in: query
|
||||
name: type
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -244,6 +330,240 @@ paths:
|
||||
summary: Обновить тюк
|
||||
tags:
|
||||
- bales
|
||||
/events:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Создаёт новое событие на этапе производственной линии
|
||||
parameters:
|
||||
- description: Данные события
|
||||
in: body
|
||||
name: event
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.ProductionEvent'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.ProductionEvent'
|
||||
summary: Создать событие на линии
|
||||
tags:
|
||||
- events
|
||||
/events/stage/{id}:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Возвращает последние 100 событий для указанного этапа
|
||||
parameters:
|
||||
- description: ID этапа
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.ProductionEvent'
|
||||
type: array
|
||||
summary: Получить события по этапу
|
||||
tags:
|
||||
- events
|
||||
/line/stages:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Возвращает список всех этапов производственной линии
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.LineStage'
|
||||
type: array
|
||||
summary: Получить все этапы линии
|
||||
tags:
|
||||
- line
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Создаёт новый этап производственной линии
|
||||
parameters:
|
||||
- description: Данные этапа
|
||||
in: body
|
||||
name: stage
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.LineStage'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.LineStage'
|
||||
summary: Создать этап линии
|
||||
tags:
|
||||
- line
|
||||
/line/stages/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Удаляет этап линии по ID
|
||||
parameters:
|
||||
- description: ID этапа
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
type: object
|
||||
summary: Удалить этап линии
|
||||
tags:
|
||||
- line
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Возвращает этап линии по ID
|
||||
parameters:
|
||||
- description: ID этапа
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.LineStage'
|
||||
summary: Получить этап линии по ID
|
||||
tags:
|
||||
- line
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Обновляет данные этапа линии по ID
|
||||
parameters:
|
||||
- description: ID этапа
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: Данные этапа
|
||||
in: body
|
||||
name: stage
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.LineStage'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.LineStage'
|
||||
summary: Обновить этап линии
|
||||
tags:
|
||||
- line
|
||||
/line/stats:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Возвращает сводную статистику работы производственной линии
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.LineStats'
|
||||
summary: Получить статистику линии
|
||||
tags:
|
||||
- line
|
||||
/queue/next:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Получает и удаляет из очереди следующую задачу (FIFO)
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Получить следующую задачу из очереди
|
||||
tags:
|
||||
- queue
|
||||
/sensors/readings:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Создаёт новое показание датчика для этапа линии
|
||||
parameters:
|
||||
- description: Данные показания
|
||||
in: body
|
||||
name: reading
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.SensorReading'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.SensorReading'
|
||||
summary: Создать показание датчика
|
||||
tags:
|
||||
- sensors
|
||||
/sensors/readings/stage/{id}:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Возвращает последние 100 показаний датчиков для указанного этапа
|
||||
parameters:
|
||||
- description: ID этапа
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.SensorReading'
|
||||
type: array
|
||||
summary: Получить показания датчиков по этапу
|
||||
tags:
|
||||
- sensors
|
||||
securityDefinitions:
|
||||
Bearer:
|
||||
description: Type "Bearer" followed by a space and the JWT token.
|
||||
|
||||
Reference in New Issue
Block a user