Skip to content

Commit cc5fae0

Browse files
committed
Added empty schema to body parameters in V2
1 parent b98b6d0 commit cc5fae0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.OpenApi/Models/OpenApiOperation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public void SerializeAsV2(IOpenApiWriter writer)
247247
// V2 spec actually allows the body to have custom name.
248248
// Our library does not support this at the moment.
249249
Name = "body",
250-
Schema = content?.Schema,
250+
Schema = content?.Schema ?? new OpenApiSchema(),
251251
Required = RequestBody.Required
252252
};
253253

0 commit comments

Comments
 (0)