Skip to content

Commit aa4220f

Browse files
author
Adit Sheth
committed
More changes.
1 parent c4b08d2 commit aa4220f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using System.Text.Json.Serialization.Metadata;
1414
using Microsoft.AspNetCore.Http;
1515
using Microsoft.AspNetCore.Http.Json;
16+
using Microsoft.AspNetCore.Mvc;
1617
using Microsoft.AspNetCore.Mvc.ApiExplorer;
1718
using Microsoft.AspNetCore.Mvc.Infrastructure;
1819
using Microsoft.Extensions.DependencyInjection;
@@ -121,6 +122,28 @@ internal sealed class OpenApiSchemaService(
121122
}
122123
};
123124

125+
private static string GetBinarySchemaId(Type type)
126+
{
127+
if (type == typeof(IFormFile))
128+
{
129+
return "IFormFile";
130+
}
131+
else if (type == typeof(Stream))
132+
{
133+
return "Stream";
134+
}
135+
else if (type == typeof(PipeReader))
136+
{
137+
return "PipeReader";
138+
}
139+
else if (type == typeof(FileContentResult))
140+
{
141+
return "FileContentResult";
142+
}
143+
144+
return type.Name;
145+
}
146+
124147
private static JsonObject CreateSchemaForJsonPatch()
125148
{
126149
var addReplaceTest = new JsonObject()

0 commit comments

Comments
 (0)