Skip to content

Commit

Permalink
Resolve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pixellos committed Apr 13, 2024
1 parent 745db4e commit f9997fd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private void ApplyMemberTags(OpenApiSchema schema, SchemaFilterContext context)
schema.Description = XmlCommentsTextHelper.Humanize(summaryNode);

var example = recordDefaultConstructorProperty.GetAttribute("example", string.Empty);
SetExample(schema, context, example);
TrySetExample(schema, context, example);
}

if (fieldOrPropertyNode != null)
Expand All @@ -60,11 +60,11 @@ private void ApplyMemberTags(OpenApiSchema schema, SchemaFilterContext context)
schema.Description = XmlCommentsTextHelper.Humanize(summaryNode.InnerXml);

var exampleNode = fieldOrPropertyNode.SelectSingleNode("example");
SetExample(schema, context, exampleNode?.Value);
TrySetExample(schema, context, exampleNode?.Value);
}
}

private static void SetExample(OpenApiSchema schema, SchemaFilterContext context, string example)
private static void TrySetExample(OpenApiSchema schema, SchemaFilterContext context, string example)
{
if (example == null)
return;
Expand Down

0 comments on commit f9997fd

Please sign in to comment.