Skip to content

Commit

Permalink
Ticket #54 : Fix the Swashbuckle error
Browse files Browse the repository at this point in the history
  • Loading branch information
thabart committed Nov 10, 2020
1 parent 7efd585 commit 9759667
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private OpenApiSchema GenerateReferencedSchema(DataContract dataContract, Parame
_logger.LogError($"the schema '{controller.ResourceType}' doesn't exist !");
}

var kvp = schema.Properties.First(_ => _.Key == "Attributes");
var kvp = schema.Properties.FirstOrDefault(_ => _.Key == "Attributes");
if (!kvp.Equals(default(KeyValuePair<string, OpenApiSchema>)) && !string.IsNullOrWhiteSpace(kvp.Key))
{
schema.Properties.Remove(kvp);
Expand Down

0 comments on commit 9759667

Please sign in to comment.