From ac85827db1348fcb544522d0c03b8daeb65bcf79 Mon Sep 17 00:00:00 2001 From: Michael Ganss Date: Tue, 14 May 2024 17:15:50 +0200 Subject: [PATCH] Do not add restriction attributes on collections (fixes #506) --- XmlSchemaClassGenerator/TypeModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XmlSchemaClassGenerator/TypeModel.cs b/XmlSchemaClassGenerator/TypeModel.cs index 5684968..7cbb112 100644 --- a/XmlSchemaClassGenerator/TypeModel.cs +++ b/XmlSchemaClassGenerator/TypeModel.cs @@ -622,7 +622,7 @@ private void AddDocs(CodeTypeMember member) AddDescription(member.CustomAttributes, docs); - if (PropertyType is SimpleModel simpleType) + if (PropertyType is SimpleModel simpleType && !IsEnumerable) { docs.AddRange(simpleType.Documentation); docs.AddRange(simpleType.Restrictions.Select(r => new DocumentationModel { Language = English, Text = r.Description }));