Skip to content

Commit 73cb87e

Browse files
committed
Revert change
1 parent 37c097e commit 73cb87e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ internal OpenApiBodyParameter ConvertToBodyParameter()
150150
Required = Required,
151151
Extensions = Extensions.ToDictionary(static k => k.Key, static v => v.Value) // Clone extensions so we can remove the x-bodyName extensions from the output V2 model.
152152
};
153-
if (bodyParameter.Extensions.TryGetValue(OpenApiConstants.BodyName, out var bodyParameterName))
153+
if (bodyParameter.Extensions.ContainsKey(OpenApiConstants.BodyName))
154154
{
155155
bodyParameter.Name = (Extensions[OpenApiConstants.BodyName] as OpenApiString)?.Value ?? "body";
156156
bodyParameter.Extensions.Remove(OpenApiConstants.BodyName);

0 commit comments

Comments
 (0)