diff --git a/XmlSchemaClassGenerator/ModelBuilder.cs b/XmlSchemaClassGenerator/ModelBuilder.cs index 390e10e3..0429ff1d 100644 --- a/XmlSchemaClassGenerator/ModelBuilder.cs +++ b/XmlSchemaClassGenerator/ModelBuilder.cs @@ -1075,12 +1075,13 @@ public IEnumerable GetElements(XmlSchemaObject item, XmlSchemaObject p public static List GetDocumentation(XmlSchemaAnnotated annotated) { - return annotated.Annotation == null ? new List() - : annotated.Annotation.Items.OfType() - .Where(d => d.Markup?.Length > 0) - .Select(d => new DocumentationModel { Language = d.Language, Text = new XText(d.Markup[0].InnerText).ToString() }) - .Where(d => !string.IsNullOrEmpty(d.Text)) - .ToList(); + return annotated.Annotation == null ? new List() + : annotated.Annotation.Items.OfType() + .Where(d => d.Markup?.Length > 0) + .Select(d => d.Markup.Select(m => new DocumentationModel { Language = d.Language, Text = new XText($"{m.Name}: {m.InnerText}").ToString() })) + .SelectMany(d => d) + .Where(d => !string.IsNullOrEmpty(d.Text)) + .ToList(); } public IEnumerable GenerateCode()