From 1f4810fdd81530811d16cdec23c6805780240c91 Mon Sep 17 00:00:00 2001 From: Dominik Toton <166132265+dtscalac@users.noreply.github.com> Date: Fri, 3 Jan 2025 12:32:08 +0100 Subject: [PATCH] fix(cat-voices): allow optional title in document properties/sections (#1460) * fix: make document property title optional * fix: make document section title optional * fix: make title optional --- .../lib/src/document/document_schema.dart | 4 ++-- .../src/dto/document/schema/document_schema_property_dto.dart | 4 ++-- .../src/dto/document/schema/document_schema_section_dto.dart | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/catalyst_voices/packages/internal/catalyst_voices_models/lib/src/document/document_schema.dart b/catalyst_voices/packages/internal/catalyst_voices_models/lib/src/document/document_schema.dart index 88d48a6e8ba..89c0d67e265 100644 --- a/catalyst_voices/packages/internal/catalyst_voices_models/lib/src/document/document_schema.dart +++ b/catalyst_voices/packages/internal/catalyst_voices_models/lib/src/document/document_schema.dart @@ -78,7 +78,7 @@ final class DocumentSchemaSection extends Equatable implements DocumentNode { @override final DocumentNodeId nodeId; final String id; - final String title; + final String? title; final String? description; final List properties; final bool isRequired; @@ -114,7 +114,7 @@ final class DocumentSchemaProperty extends Equatable implements DocumentNode { @override final DocumentNodeId nodeId; final String id; - final String title; + final String? title; final String? description; final Object? defaultValue; final String? guidance; diff --git a/catalyst_voices/packages/internal/catalyst_voices_repositories/lib/src/dto/document/schema/document_schema_property_dto.dart b/catalyst_voices/packages/internal/catalyst_voices_repositories/lib/src/dto/document/schema/document_schema_property_dto.dart index 2ce3a15abe7..cd32518ec9c 100644 --- a/catalyst_voices/packages/internal/catalyst_voices_repositories/lib/src/dto/document/schema/document_schema_property_dto.dart +++ b/catalyst_voices/packages/internal/catalyst_voices_repositories/lib/src/dto/document/schema/document_schema_property_dto.dart @@ -10,7 +10,7 @@ final class DocumentSchemaPropertyDto { final String ref; @JsonKey(includeToJson: false) final String id; - final String title; + final String? title; final String? description; @JsonKey(includeIfNull: false) final int? minLength; @@ -38,7 +38,7 @@ final class DocumentSchemaPropertyDto { const DocumentSchemaPropertyDto({ this.ref = '', required this.id, - required this.title, + this.title, this.description, this.minLength, this.maxLength, diff --git a/catalyst_voices/packages/internal/catalyst_voices_repositories/lib/src/dto/document/schema/document_schema_section_dto.dart b/catalyst_voices/packages/internal/catalyst_voices_repositories/lib/src/dto/document/schema/document_schema_section_dto.dart index b773eb38479..d63487761e0 100644 --- a/catalyst_voices/packages/internal/catalyst_voices_repositories/lib/src/dto/document/schema/document_schema_section_dto.dart +++ b/catalyst_voices/packages/internal/catalyst_voices_repositories/lib/src/dto/document/schema/document_schema_section_dto.dart @@ -11,7 +11,7 @@ final class DocumentSchemaSectionDto { final String id; @JsonKey(name: r'$ref') final String ref; - final String title; + final String? title; final String? description; @DocumentSchemaPropertiesDtoConverter() final List properties; @@ -22,7 +22,7 @@ final class DocumentSchemaSectionDto { const DocumentSchemaSectionDto({ required this.id, required this.ref, - required this.title, + this.title, this.description, required this.properties, this.required,