mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-11 02:20:20 +08:00
fix: Fix null reference exception in swagger default value
This commit is contained in:
parent
5b0c72380f
commit
d81c5c85db
@ -41,7 +41,12 @@ namespace BuildingBlocks.Swagger
|
||||
// REF: https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/413
|
||||
foreach (var parameter in operation.Parameters)
|
||||
{
|
||||
var description = apiDescription.ParameterDescriptions.First(p => p.Name == parameter.Name);
|
||||
var description = apiDescription.ParameterDescriptions.FirstOrDefault(p => p.Name == parameter.Name);
|
||||
|
||||
if (description is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (parameter.Description == null)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user