mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-05-04 03:48:40 +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
|
// REF: https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/413
|
||||||
foreach (var parameter in operation.Parameters)
|
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)
|
if (parameter.Description == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user