From: Jérôme Benoit Date: Mon, 30 Mar 2026 23:03:46 +0000 (+0200) Subject: docs: fix JSDoc using historical language instead of current-state descriptions X-Git-Tag: ocpp-server@v4.1.0~14 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f753beb9a75a7306b8f94ba6254220b6e805a6b3;p=e-mobility-charging-stations-simulator.git docs: fix JSDoc using historical language instead of current-state descriptions Replace history-telling patterns ('previously', 'no longer valid', 'unused but required by interface', 'kept for API consistency') with descriptions of current behavior. --- diff --git a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts index c0f7b452..a4a4b3d6 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts @@ -71,7 +71,7 @@ const moduleName = 'OCPP16ResponseService' * is processed by dedicated handler methods that manage charging station state updates. * * Response Validation Workflow: - * 1. Response received from Central System for previously sent request + * 1. Response received from Central System for the corresponding request * 2. Response payload validated against OCPP 1.6 JSON schema * 3. Response routed to appropriate handler based on original request type * 4. Charging station state updated based on response content diff --git a/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts b/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts index 1470cae6..c0d970c5 100644 --- a/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts +++ b/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts @@ -80,7 +80,7 @@ const moduleName = 'OCPP20ResponseService' * components to provide comprehensive protocol support with enhanced features. * * Response Validation Workflow: - * 1. Response received from CSMS for previously sent request + * 1. Response received from CSMS for the corresponding request * 2. Response payload validated against OCPP 2.0+ JSON schema * 3. Response routed to appropriate handler based on original request type * 4. Charging station state and variable model updated based on response content diff --git a/src/charging-station/ocpp/auth/strategies/LocalAuthStrategy.ts b/src/charging-station/ocpp/auth/strategies/LocalAuthStrategy.ts index b7f071f5..84741033 100644 --- a/src/charging-station/ocpp/auth/strategies/LocalAuthStrategy.ts +++ b/src/charging-station/ocpp/auth/strategies/LocalAuthStrategy.ts @@ -335,7 +335,7 @@ export class LocalAuthStrategy implements AuthStrategy { /** * Check authorization cache for identifier * @param request - Authorization request containing identifier to look up - * @param config - Authentication configuration (unused but required by interface) + * @param config - Authentication configuration (unused in cache check) * @returns Cached authorization result if found and not expired; undefined otherwise */ private checkAuthCache ( @@ -371,7 +371,7 @@ export class LocalAuthStrategy implements AuthStrategy { /** * Check local authorization list for identifier * @param request - Authorization request containing identifier to look up - * @param config - Authentication configuration (unused but required by interface) + * @param config - Authentication configuration (unused in local list check) * @returns Authorization result from local list if found; undefined otherwise */ private async checkLocalAuthList ( diff --git a/tests/charging-station/helpers/StationHelpers.ts b/tests/charging-station/helpers/StationHelpers.ts index 1b9d084d..b20995ab 100644 --- a/tests/charging-station/helpers/StationHelpers.ts +++ b/tests/charging-station/helpers/StationHelpers.ts @@ -243,7 +243,7 @@ export function cleanupChargingStation (station: ChargingStation): void { * Create a connector status object with default values * * This is the canonical factory for creating ConnectorStatus objects in tests. - * @param _connectorId - Connector ID (unused, kept for API consistency) + * @param _connectorId - Connector ID (unused; factory creates default connector status) * @param options - Optional overrides for default values * @returns ConnectorStatus with default or customized values * @example diff --git a/tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts b/tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts index ef969058..5a5ea13a 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts @@ -1604,7 +1604,7 @@ await describe('B05 - OCPP20VariableManager', async () => { await it('should reject removed TimeSource members RTC and Manual', () => { const res = manager.setVariables(station, [ { - attributeValue: 'NTP,GPS,RTC,Manual', // RTC & Manual no longer valid + attributeValue: 'NTP,GPS,RTC,Manual', // RTC and Manual are invalid TimeSource values component: { name: OCPP20ComponentName.ClockCtrlr }, variable: { name: OCPP20RequiredVariableName.TimeSource }, },