diff --git a/src/schemas/ingestion/validationTask.schema.ts b/src/schemas/ingestion/validationTask.schema.ts index 7efeec2..644334e 100644 --- a/src/schemas/ingestion/validationTask.schema.ts +++ b/src/schemas/ingestion/validationTask.schema.ts @@ -4,7 +4,6 @@ export const counterSchema = z.number().min(0).describe('A non-negative integer export const thresholdCheckSchema = z.object({ exceeded: z.boolean().describe('Indicates if the threshold has been exceeded'), - count: counterSchema, }); export const featuresErrorCountSchema = z.object({ @@ -12,10 +11,18 @@ export const featuresErrorCountSchema = z.object({ vertices: counterSchema.describe('Number of features exceeding the maximum allowed vertices'), metadata: counterSchema.describe('Number of features with invalid or missing metadata'), resolution: counterSchema.describe('Number of features not matching the required resolution'), + smallHoles: counterSchema.describe('Number of features containing small holes'), + smallGeometries: counterSchema.describe('Number of features containing small geometries'), +}); + +export const thresholdsSchema = z.object({ + smallHoles: thresholdCheckSchema.describe('Small holes threshold check result').extend({ + count: counterSchema, + }), + smallGeometries: thresholdCheckSchema.describe('Small geometries threshold check result'), }); export const validationAggregatedErrorsSchema = z.object({ errorsCount: featuresErrorCountSchema.describe('Aggregated count of validation errors'), - smallHoles: thresholdCheckSchema.describe('Small holes threshold check result'), - smallGeometries: thresholdCheckSchema.describe('Small geometries threshold check result'), + thresholds: thresholdsSchema.describe('Threshold check results'), }); diff --git a/src/types/ingestion/report.type.ts b/src/types/ingestion/report.type.ts index 21c49d3..a58d6c5 100644 --- a/src/types/ingestion/report.type.ts +++ b/src/types/ingestion/report.type.ts @@ -11,6 +11,5 @@ export interface PolygonPartValidationError { } export interface PolygonPartsChunkValidationResult { parts: PolygonPartValidationError[]; - smallGeometriesCount: number; smallHolesCount: number; }