From 29286b7c8167f85413547ef176fb233097065489 Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Tue, 3 Sep 2024 14:49:38 +0000 Subject: [PATCH] chore!: make Field's `universal` property optional in schema This is a partial revert of 4ce47f09ba980fbc70a978b1afc399e22313382e. `universal` should be non-optional in the protobuf (for serialization) but optional in the schema. This fixes that. --- schema/field/v1.json | 2 +- src/lib/encode-conversions.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/schema/field/v1.json b/schema/field/v1.json index 3483d27..0675591 100644 --- a/schema/field/v1.json +++ b/schema/field/v1.json @@ -102,6 +102,6 @@ "type": "string" } }, - "required": ["tagKey", "type", "label", "schemaName", "universal"], + "required": ["tagKey", "type", "label", "schemaName"], "additionalProperties": false } diff --git a/src/lib/encode-conversions.ts b/src/lib/encode-conversions.ts index 5ddf86e..2cd7342 100644 --- a/src/lib/encode-conversions.ts +++ b/src/lib/encode-conversions.ts @@ -64,6 +64,7 @@ export const convertField: ConvertFunction<'field'> = (mapeoDoc) => { } }) : [], + universal: Boolean(mapeoDoc.universal), } }