From 168aaecdd8bd5e5bc6e0cd14036f137967edcead Mon Sep 17 00:00:00 2001 From: Shahar s <65118046+cl-shaharshavit-rnd@users.noreply.github.com> Date: Sun, 9 Jan 2022 10:48:26 +0200 Subject: [PATCH] fix: made included in best ts type nullable (#118) --- .../layerMetadata/decorators/property/tsTypes.decorator.ts | 4 ++++ src/models/layerMetadata/pycswLayerCatalogRecord.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/models/layerMetadata/decorators/property/tsTypes.decorator.ts b/src/models/layerMetadata/decorators/property/tsTypes.decorator.ts index bb24a53..741ce04 100644 --- a/src/models/layerMetadata/decorators/property/tsTypes.decorator.ts +++ b/src/models/layerMetadata/decorators/property/tsTypes.decorator.ts @@ -26,6 +26,10 @@ export const TsTypes: Record = { value: 'string', type: PropertiesTypes.ARRAY, }, + NULLABLE_STRING: { + value: 'string | null', + type: PropertiesTypes.PRIMITIVE, + }, BOOLEAN: { value: 'boolean', type: PropertiesTypes.PRIMITIVE, diff --git a/src/models/layerMetadata/pycswLayerCatalogRecord.ts b/src/models/layerMetadata/pycswLayerCatalogRecord.ts index 0065cf5..951d54d 100644 --- a/src/models/layerMetadata/pycswLayerCatalogRecord.ts +++ b/src/models/layerMetadata/pycswLayerCatalogRecord.ts @@ -34,7 +34,7 @@ export class PycswLayerCatalogRecord extends LayerMetadata implements IPycswCore }, }) @tsTypes({ - mappingType: TsTypes.STRING, + mappingType: TsTypes.NULLABLE_STRING, }) @graphql() @fieldConfig({