From 8db1923b315c793d349da868f9299feb983408be Mon Sep 17 00:00:00 2001 From: Kate Latypova Date: Wed, 1 Mar 2023 13:00:55 +0300 Subject: [PATCH] fix: fix map block scheme --- src/schema/validators/common.ts | 43 +++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/src/schema/validators/common.ts b/src/schema/validators/common.ts index 6a90624df..28c395177 100644 --- a/src/schema/validators/common.ts +++ b/src/schema/validators/common.ts @@ -495,31 +495,38 @@ export const MediaProps = { }; export const YMapMarkerLabel = { + type: 'object', required: [], - iconCaption: { - type: 'string', - }, - iconContent: { - type: 'string', - }, - iconColor: { - type: 'string', - }, - preset: { - type: 'string', + properties: { + iconCaption: { + type: 'string', + }, + iconContent: { + type: 'string', + }, + iconColor: { + type: 'string', + }, + preset: { + type: 'string', + }, }, }; export const YMapMarker = { + type: 'object', + additionalProperties: false, required: [], - coordinate: { - type: 'array', - items: {type: 'number'}, - }, - address: { - type: 'string', + properties: { + coordinate: { + type: 'array', + items: {type: 'number'}, + }, + address: { + type: 'string', + }, + label: YMapMarkerLabel, }, - label: YMapMarkerLabel, }; export const MapProps = {