Add DepartmentGate and DepartmentRelay endpoints and schemas to OpenAPI spec
This commit is contained in:
+337
-2
@@ -2767,6 +2767,174 @@ paths:
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
|
||||
/department/gates:
|
||||
get:
|
||||
tags:
|
||||
- Departments
|
||||
summary: List department gates
|
||||
description: Retrieve department gates, optionally filtered by id
|
||||
operationId: listDepartmentGates
|
||||
parameters:
|
||||
- name: id
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
- $ref: '#/components/parameters/PageParam'
|
||||
- $ref: '#/components/parameters/PerPageParam'
|
||||
- $ref: '#/components/parameters/SearchParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Department gates retrieved successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/DepartmentGate'
|
||||
- type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DepartmentGate'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
post:
|
||||
tags:
|
||||
- Departments
|
||||
summary: Create department gate
|
||||
operationId: createDepartmentGate
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DepartmentGateCreate'
|
||||
responses:
|
||||
'201':
|
||||
description: Department gate created successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DepartmentGate'
|
||||
put:
|
||||
tags:
|
||||
- Departments
|
||||
summary: Update department gate
|
||||
operationId: updateDepartmentGate
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DepartmentGateUpdate'
|
||||
responses:
|
||||
'200':
|
||||
description: Department gate updated successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DepartmentGate'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
delete:
|
||||
tags:
|
||||
- Departments
|
||||
summary: Delete department gate
|
||||
operationId: deleteDepartmentGate
|
||||
parameters:
|
||||
- name: id
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
responses:
|
||||
'200':
|
||||
description: Department gate deleted
|
||||
|
||||
/department/relays:
|
||||
get:
|
||||
tags:
|
||||
- Departments
|
||||
summary: List department relays
|
||||
description: Retrieve department relays, optionally filtered by id
|
||||
operationId: listDepartmentRelays
|
||||
parameters:
|
||||
- name: id
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
- $ref: '#/components/parameters/PageParam'
|
||||
- $ref: '#/components/parameters/PerPageParam'
|
||||
- $ref: '#/components/parameters/SearchParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Department relays retrieved successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/DepartmentRelay'
|
||||
- type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DepartmentRelay'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
post:
|
||||
tags:
|
||||
- Departments
|
||||
summary: Create department relay
|
||||
operationId: createDepartmentRelay
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DepartmentRelayCreate'
|
||||
responses:
|
||||
'201':
|
||||
description: Department relay created successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DepartmentRelay'
|
||||
put:
|
||||
tags:
|
||||
- Departments
|
||||
summary: Update department relay
|
||||
operationId: updateDepartmentRelay
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DepartmentRelayUpdate'
|
||||
responses:
|
||||
'200':
|
||||
description: Department relay updated successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DepartmentRelay'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
delete:
|
||||
tags:
|
||||
- Departments
|
||||
summary: Delete department relay
|
||||
operationId: deleteDepartmentRelay
|
||||
parameters:
|
||||
- name: id
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
responses:
|
||||
'200':
|
||||
description: Department relay deleted
|
||||
|
||||
/department/lanes/dynamic-image:
|
||||
get:
|
||||
tags:
|
||||
@@ -2871,6 +3039,12 @@ paths:
|
||||
description: Get list of departments without authentication
|
||||
operationId: listGuestDepartments
|
||||
security: []
|
||||
parameters:
|
||||
- name: include_lanes
|
||||
in: query
|
||||
description: Whether to include lane status and self-serve information
|
||||
schema:
|
||||
type: boolean
|
||||
responses:
|
||||
'200':
|
||||
description: Departments retrieved successfully
|
||||
@@ -2879,7 +3053,7 @@ paths:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Department'
|
||||
$ref: '#/components/schemas/DepartmentGuest'
|
||||
|
||||
/department/selfserve/questions:
|
||||
get:
|
||||
@@ -7621,7 +7795,7 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
module: { type: string, enum: [bird] }
|
||||
variable: { type: string, enum: [api_key, enabled, server_url] }
|
||||
variable: { type: string, enum: [api_key, enabled, server_url, workplaceId, channelId] }
|
||||
type: { type: string, enum: [string, bool] }
|
||||
value:
|
||||
oneOf:
|
||||
@@ -8721,6 +8895,45 @@ components:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
DepartmentGuest:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
name:
|
||||
type: string
|
||||
longitude:
|
||||
type: number
|
||||
format: float
|
||||
latitude:
|
||||
type: number
|
||||
format: float
|
||||
address:
|
||||
type: string
|
||||
description: Department address (same as description)
|
||||
self_serve_enabled:
|
||||
type: boolean
|
||||
lanes:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DepartmentLaneGuest'
|
||||
|
||||
DepartmentLaneGuest:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
products:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
machine_available:
|
||||
type: boolean
|
||||
|
||||
DepartmentCreate:
|
||||
type: object
|
||||
required:
|
||||
@@ -8831,6 +9044,128 @@ components:
|
||||
nullable: true
|
||||
minimum: 1
|
||||
|
||||
DepartmentGate:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
department:
|
||||
type: integer
|
||||
is_entrance:
|
||||
type: boolean
|
||||
is_exit:
|
||||
type: boolean
|
||||
name:
|
||||
type: string
|
||||
config:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
DepartmentGateCreate:
|
||||
type: object
|
||||
required:
|
||||
- department
|
||||
- is_entrance
|
||||
- is_exit
|
||||
- name
|
||||
- config
|
||||
properties:
|
||||
department:
|
||||
type: integer
|
||||
is_entrance:
|
||||
type: boolean
|
||||
is_exit:
|
||||
type: boolean
|
||||
name:
|
||||
type: string
|
||||
config:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
|
||||
DepartmentGateUpdate:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
is_entrance:
|
||||
type: boolean
|
||||
is_exit:
|
||||
type: boolean
|
||||
name:
|
||||
type: string
|
||||
config:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
|
||||
DepartmentRelay:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
department:
|
||||
type: integer
|
||||
relay_id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
config:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
DepartmentRelayCreate:
|
||||
type: object
|
||||
required:
|
||||
- department
|
||||
- relay_id
|
||||
- name
|
||||
- type
|
||||
- config
|
||||
properties:
|
||||
department:
|
||||
type: integer
|
||||
relay_id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
config:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
|
||||
DepartmentRelayUpdate:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
relay_id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
config:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
|
||||
Product:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user