fix: move and fix statistic related helpers implementation
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / 2.0 / OCPP20ServiceUtils.ts
... / ...
CommitLineData
1// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
2
3import path from 'node:path';
4import { fileURLToPath } from 'node:url';
5
6import type { JSONSchemaType } from 'ajv';
7
8import { type JsonType, OCPPVersion } from '../../../types';
9import { OCPPServiceUtils } from '../internal';
10
11export class OCPP20ServiceUtils extends OCPPServiceUtils {
12 public static parseJsonSchemaFile<T extends JsonType>(
13 relativePath: string,
14 moduleName?: string,
15 methodName?: string
16 ): JSONSchemaType<T> {
17 return super.parseJsonSchemaFile<T>(
18 path.resolve(path.dirname(fileURLToPath(import.meta.url)), relativePath),
19 OCPPVersion.VERSION_20,
20 moduleName,
21 methodName
22 );
23 }
24}