Skip to content

Commit

Permalink
Update src/Kiota.Builder/Extensions/OpenApiDeprecationExtensionExtens…
Browse files Browse the repository at this point in the history
…ions.cs

Co-authored-by: Vincent Biret <[email protected]>
  • Loading branch information
samwelkanda and baywet authored Oct 26, 2023
1 parent fa340f8 commit 7caaa32
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ internal static DeprecationInformation GetDeprecationInformation(this OpenApiOpe
else if (operation.Responses.Values
.SelectMany(static x => x.Content.Values)
.Select(static x => x?.Schema)
.Where(static x => x != null && !x.IsReferencedSchema())
.OfType<OpenApiSchema>()
.Where(static x => !x.IsReferencedSchema())
.Select(static x => x!.GetDeprecationInformation())
.FirstOrDefault(static x => x.IsDeprecated) is DeprecationInformation responseDeprecationInformation)
return responseDeprecationInformation;
Expand Down

0 comments on commit 7caaa32

Please sign in to comment.