Moved performance schema in storage asset directory
RENAME
src/assets/schemas/performance/performance.json
src/assets/storage/schemas/performance/performance-save.json
{
- "$id": "performance",
+ "$id": "performance-save",
"title": "Validate the performance object",
"type": "object",
"properties": {

RENAME
src/assets/storage/schemas/tenant-save.json
src/assets/storage/schemas/tenant/tenant-save.json
MODIFY
src/storage/validator/PerformanceValidatorStorage.ts
src/storage/validator/PerformanceValidatorStorage.ts
@@ -6,7 +6,7 @@ import global from '../../types/GlobalType';
export default class PerformanceValidatorStorage extends SchemaValidator {
private static instance: PerformanceValidatorStorage | null = null;
- private performance: Schema = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/schemas/performance/performance.json`, 'utf8'));
+ private performanceSave: Schema = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/storage/schemas/performance/performance-save.json`, 'utf8'));
private constructor() {
super('PerformanceValidatorStorage', {
@@ -27,6 +27,6 @@ export default class PerformanceValidatorStorage extends SchemaValidator {
}
public validatePerformance(data: any): PerformanceRecord {
- return this.validate(this.performance, data);
+ return this.validate(this.performanceSave, data, true);
}
}

MODIFY
src/storage/validator/TenantValidatorStorage.ts
src/storage/validator/TenantValidatorStorage.ts
@@ -6,7 +6,7 @@ import global from '../../types/GlobalType';
export default class TenantValidatorStorage extends SchemaValidator {
private static instance: TenantValidatorStorage | null = null;
- private tenantSave: Schema = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/storage/schemas/tenant-save.json`, 'utf8'));
+ private tenantSave: Schema = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/storage/schemas/tenant/tenant-save.json`, 'utf8'));
private constructor() {
super('TenantValidatorStorage', {

Moved performance schema in storage asset directory