Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
heldersepu committed Jun 12, 2023
2 parents 8201dac + 0714cc7 commit 378d1a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Swagger.Net/Swagger/Extensions/SchemaExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ public static Schema WithDescriptionProperty(this Schema schema, JsonProperty js
return schema;

var attrib = propInfo.GetCustomAttributes(false).OfType<SwaggerDescriptionAttribute>().FirstOrDefault();
schema.description = attrib?.Description;
var description = attrib?.Description;
if (description != null)
schema.description = description;

return schema;
}

Expand Down

0 comments on commit 378d1a7

Please sign in to comment.