fix: integrity checks dto validation (#29621)
This commit is contained in:
@@ -28,8 +28,8 @@ class SystemConfigIntegrityChecksumJob {
|
|||||||
/// Percentage limit of the integrity checksum job
|
/// Percentage limit of the integrity checksum job
|
||||||
///
|
///
|
||||||
/// Minimum value: 0
|
/// Minimum value: 0
|
||||||
/// Maximum value: 9007199254740991
|
/// Maximum value: 1
|
||||||
int percentageLimit;
|
double percentageLimit;
|
||||||
|
|
||||||
/// How long the integrity checksum job may run for
|
/// How long the integrity checksum job may run for
|
||||||
///
|
///
|
||||||
@@ -75,7 +75,7 @@ class SystemConfigIntegrityChecksumJob {
|
|||||||
return SystemConfigIntegrityChecksumJob(
|
return SystemConfigIntegrityChecksumJob(
|
||||||
cronExpression: mapValueOfType<String>(json, r'cronExpression')!,
|
cronExpression: mapValueOfType<String>(json, r'cronExpression')!,
|
||||||
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
||||||
percentageLimit: mapValueOfType<int>(json, r'percentageLimit')!,
|
percentageLimit: mapValueOfType<double>(json, r'percentageLimit')!,
|
||||||
timeLimit: mapValueOfType<int>(json, r'timeLimit')!,
|
timeLimit: mapValueOfType<int>(json, r'timeLimit')!,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25917,9 +25917,10 @@
|
|||||||
},
|
},
|
||||||
"percentageLimit": {
|
"percentageLimit": {
|
||||||
"description": "Percentage limit of the integrity checksum job",
|
"description": "Percentage limit of the integrity checksum job",
|
||||||
"maximum": 9007199254740991,
|
"format": "double",
|
||||||
|
"maximum": 1,
|
||||||
"minimum": 0,
|
"minimum": 0,
|
||||||
"type": "integer"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"timeLimit": {
|
"timeLimit": {
|
||||||
"description": "How long the integrity checksum job may run for",
|
"description": "How long the integrity checksum job may run for",
|
||||||
|
|||||||
@@ -74,7 +74,12 @@ const SystemConfigIntegrityJobSchema = z
|
|||||||
|
|
||||||
const SystemConfigIntegrityChecksumJobSchema = SystemConfigIntegrityJobSchema.extend({
|
const SystemConfigIntegrityChecksumJobSchema = SystemConfigIntegrityJobSchema.extend({
|
||||||
timeLimit: z.int().nonnegative().describe('How long the integrity checksum job may run for'),
|
timeLimit: z.int().nonnegative().describe('How long the integrity checksum job may run for'),
|
||||||
percentageLimit: z.int().nonnegative().describe('Percentage limit of the integrity checksum job'),
|
percentageLimit: z
|
||||||
|
.float32()
|
||||||
|
.nonnegative()
|
||||||
|
.max(1)
|
||||||
|
.describe('Percentage limit of the integrity checksum job')
|
||||||
|
.meta({ format: 'double' }),
|
||||||
})
|
})
|
||||||
.describe('Integrity checksum job config')
|
.describe('Integrity checksum job config')
|
||||||
.meta({ id: 'SystemConfigIntegrityChecksumJob' });
|
.meta({ id: 'SystemConfigIntegrityChecksumJob' });
|
||||||
|
|||||||
Reference in New Issue
Block a user