From 1063822f70572f0c3d20a32f0dbe5d34340ff77c Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Tue, 3 Sep 2024 10:19:31 -0500 Subject: [PATCH] chore!: make Field's `universal` property optional in schema (#236) 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), } }