From 5faaba6bc5e1aced5634b036687ac2fd6344153d Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Mon, 16 Sep 2024 16:53:43 +0000 Subject: [PATCH] Field type requirement cleanup Co-Authored-By: Gregor MacLennan --- proto/field/v1.proto | 2 +- src/lib/decode-conversions.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/proto/field/v1.proto b/proto/field/v1.proto index 9792ac8..9905534 100644 --- a/proto/field/v1.proto +++ b/proto/field/v1.proto @@ -22,7 +22,7 @@ message Field_1 { selectOne = 3; selectMultiple = 4; } - Type type = 6 [(required) = true]; + Type type = 6; string label = 7 [(required) = true]; enum Appearance { appearance_unspecified = 0; diff --git a/src/lib/decode-conversions.ts b/src/lib/decode-conversions.ts index 0690416..6a75c60 100644 --- a/src/lib/decode-conversions.ts +++ b/src/lib/decode-conversions.ts @@ -138,7 +138,6 @@ export const convertField: ConvertFunction<'field'> = (message, versionObj) => { const { common, schemaVersion, tagKey, type, label, ...rest } = message const jsonSchemaCommon = convertCommon(common, versionObj) ensure(tagKey, 'field', 'tagKey') - ensure(type !== 'type_unspecified', 'field', 'type') return { ...jsonSchemaCommon, ...rest,