From 73d15553c52dfbae49b7b5599b03a475250d5cad Mon Sep 17 00:00:00 2001 From: almog8k Date: Mon, 24 Nov 2025 14:49:37 +0200 Subject: [PATCH 1/3] fix: remove smallGeometriesCount from PolygonPartsChunkValidationResult interface --- src/types/ingestion/report.type.ts | 1 - 1 file changed, 1 deletion(-) 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; } From 05e0261303c8ee8c17d76756025f794c7f473ad5 Mon Sep 17 00:00:00 2001 From: almog8k Date: Mon, 24 Nov 2025 15:11:17 +0200 Subject: [PATCH 2/3] fix: move samall geometries count to general count --- src/schemas/ingestion/validationTask.schema.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/schemas/ingestion/validationTask.schema.ts b/src/schemas/ingestion/validationTask.schema.ts index 7efeec2..709c126 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,14 @@ 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 validationAggregatedErrorsSchema = z.object({ errorsCount: featuresErrorCountSchema.describe('Aggregated count of validation errors'), - smallHoles: thresholdCheckSchema.describe('Small holes threshold check result'), + smallHoles: thresholdCheckSchema.describe('Small holes threshold check result').extend({ + count: counterSchema, + }), smallGeometries: thresholdCheckSchema.describe('Small geometries threshold check result'), }); From 4a1d49ae8cd4b708b7d7daac73ff2618d671d1da Mon Sep 17 00:00:00 2001 From: almog8k Date: Mon, 24 Nov 2025 15:20:01 +0200 Subject: [PATCH 3/3] refactor: refactor: reorganize validation schemas for better structure --- src/schemas/ingestion/validationTask.schema.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/schemas/ingestion/validationTask.schema.ts b/src/schemas/ingestion/validationTask.schema.ts index 709c126..644334e 100644 --- a/src/schemas/ingestion/validationTask.schema.ts +++ b/src/schemas/ingestion/validationTask.schema.ts @@ -15,10 +15,14 @@ export const featuresErrorCountSchema = z.object({ smallGeometries: counterSchema.describe('Number of features containing small geometries'), }); -export const validationAggregatedErrorsSchema = z.object({ - errorsCount: featuresErrorCountSchema.describe('Aggregated count of validation errors'), +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'), + thresholds: thresholdsSchema.describe('Threshold check results'), +});