We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fb6ea09 + 6d7f735 commit 39a2cc8Copy full SHA for 39a2cc8
src/Microsoft.OpenApi/Models/OpenApiOperation.cs
@@ -253,9 +253,11 @@ public void SerializeAsV2(IOpenApiWriter writer)
253
{
254
foreach (var property in RequestBody.Content.First().Value.Schema.Properties)
255
256
- var paramName = property.Key;
257
var paramSchema = property.Value;
258
- if (paramSchema.Type == "string" && paramSchema.Format == "binary") {
+ if ("string".Equals(paramSchema.Type, StringComparison.OrdinalIgnoreCase)
+ && ("binary".Equals(paramSchema.Format, StringComparison.OrdinalIgnoreCase)
259
+ || "base64".Equals(paramSchema.Format, StringComparison.OrdinalIgnoreCase)))
260
+ {
261
paramSchema.Type = "file";
262
paramSchema.Format = null;
263
}
0 commit comments