Add new schemas for SelfServeLaneStatus and SelfServeConfig in OpenAPI spec; extend self-serve lane commands with RESERVE and RELEASE; enhance lane status and configuration endpoints with detailed request/response schemas; add support for dynamic lane ID retrieval in routes.

This commit is contained in:
Jeppe Bundgaard
2026-01-15 11:47:26 +01:00
parent 6cc5344fc2
commit 9c9c6616db
2 changed files with 74 additions and 4 deletions
+72 -3
View File
@@ -3940,6 +3940,10 @@ paths:
responses:
'200':
description: Lane status retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/SelfServeLaneStatus'
/modules/self-serve/lane/command:
post:
@@ -3962,10 +3966,17 @@ paths:
type: integer
command:
type: string
enum: [start, stop, reset]
enum: [START, STOP, RESET, RESERVE, RELEASE]
license_plate:
type: string
description: Required for START command
responses:
'200':
description: Command sent successfully
content:
application/json:
schema:
$ref: '#/components/schemas/SelfServeLaneStatus'
# Module - Other Integration Endpoints
/modules/motorapi/lookup:
@@ -4515,13 +4526,29 @@ paths:
summary: Get Self-Serve config
operationId: getSelfServeConfig
responses:
'200': {description: Success}
'200':
description: Self-serve configuration retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/SelfServeConfig'
post:
tags: [Config]
summary: Update Self-Serve config
operationId: updateSelfServeConfig
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SelfServeConfig'
responses:
'200': {description: Success}
'200':
description: Self-serve configuration updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/SelfServeConfig'
/branding:
get:
@@ -5153,6 +5180,48 @@ components:
type: string
format: date-time
SelfServeLaneStatus:
type: object
properties:
id:
type: integer
description: Lane ID
status:
type: string
description: Current lane status (e.g., IDLE, OCCUPIED)
mode:
type: string
description: Current lane mode (e.g., AUTOMATIC, MANUAL)
state:
type: string
description: Current lane state (e.g., READY, WASHING)
wash_start_time:
type: integer
description: Timestamp when the wash started (0 if not washing)
nullable: true
elapsed_wash_time:
type: integer
description: Elapsed wash time in seconds
nullable: true
license_plate:
type: string
description: License plate of the vehicle in the lane
nullable: true
customer_number:
type: integer
description: Customer number associated with the current lane use
nullable: true
SelfServeConfig:
type: object
properties:
enabled:
type: boolean
description: Whether the self-serve module is enabled
minute_product:
type: integer
description: The product ID used for minute-based billing
DepartmentSelfserveQuestion:
type: object
properties:
@@ -31,7 +31,8 @@ class moduleSelfServeRoute
global $response;
self::requirePermission('modules_selfserve_lane_status_view');
$selfserve = new selfserve();
$lane = $selfserve->lane(1);
$lane_id = self::isParametersSet(['lane_id']) ? (int)self::getParameter('lane_id') : 1;
$lane = $selfserve->lane($lane_id);
$response->success([
'id' => $lane->id,
'status' => $lane->getLaneStatus()->name,