From 27729e30b4165b863d16109b123374124610ad74 Mon Sep 17 00:00:00 2001 From: almog8k Date: Mon, 10 Nov 2025 11:58:50 +0200 Subject: [PATCH] feat: support multippolygon in polygonPartsFeatureCollectionSchema --- src/schemas/ingestion/polygonParts.schema.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/schemas/ingestion/polygonParts.schema.ts b/src/schemas/ingestion/polygonParts.schema.ts index a290b07..0ee8905 100644 --- a/src/schemas/ingestion/polygonParts.schema.ts +++ b/src/schemas/ingestion/polygonParts.schema.ts @@ -1,7 +1,15 @@ import { z } from 'zod'; import { CORE_VALIDATIONS } from '../../constants'; import { INGESTION_VALIDATIONS } from '../../constants/ingestion/constants'; -import { featureCollectionSchema, featureSchema, polygonSchema, rasterProductTypeSchema, resourceIdSchema, versionSchema } from '../core'; +import { + featureCollectionSchema, + featureSchema, + multiPolygonSchema, + polygonSchema, + rasterProductTypeSchema, + resourceIdSchema, + versionSchema, +} from '../core'; import { polygonPartsEntityPatternSchema } from './layerNameFormats.schema'; export const partSchema = z @@ -76,7 +84,7 @@ export const polygonPartsEntityNameSchema = z }) .describe('polygonPartsEntityNameSchema'); -export const polygonPartsFeatureSchema = featureSchema(polygonSchema, partSchema); +export const polygonPartsFeatureSchema = featureSchema(polygonSchema.or(multiPolygonSchema), partSchema); export const polygonPartsFeatureCollectionSchema = featureCollectionSchema(polygonPartsFeatureSchema);