- public static parseJsonSchemaFile<T extends JsonType>(relativePath: string): JSONSchemaType<T> {
- const filePath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), relativePath);
- try {
- return JSON.parse(fs.readFileSync(filePath, 'utf8')) as JSONSchemaType<T>;
- } catch (error) {
- FileUtils.handleFileException(
- OCPPServiceUtils.logPrefix(OCPPVersion.VERSION_20),
- FileType.JsonSchema,
- filePath,
- error as NodeJS.ErrnoException,
- { throwError: false }
- );
- }
+ public static parseJsonSchemaFile<T extends JsonType>(
+ relativePath: string,
+ moduleName?: string,
+ methodName?: string
+ ): JSONSchemaType<T> {
+ return super.parseJsonSchemaFile<T>(
+ relativePath,
+ OCPPVersion.VERSION_201,
+ moduleName,
+ methodName
+ )