Skip to content

Commit

Permalink
Stream/file returns
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Sep 15, 2024
1 parent dd6b77a commit 7b640ad
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ string GetResponseType(OpenApiOperation op)
{
string? responseType = null;
if (response.TryGetValue("application/json", out var responseContent))
responseType = GetSchemaType(responseContent.Schema);
responseType = this.GetSchemaType(responseContent.Schema);

return responseType;
}
Expand Down Expand Up @@ -164,6 +164,9 @@ string GetResponseType(OpenApiOperation op)
var listType = this.GetSchemaType(schema.Items);
return $"global::System.Collections.Generic.List<{listType}>";

case "file":
return "global::System.IO.Stream";

case "object":
if (schema.AdditionalProperties == null)
{
Expand Down Expand Up @@ -249,7 +252,7 @@ string GenerateComplexType(KeyValuePair<string, OpenApiSchema> schema, Action<st
if (schema.Value.AllOf.Count == 1)
{
// add inheritance
var baseType = GetSchemaType(schema.Value.AllOf.Single());
var baseType = this.GetSchemaType(schema.Value.AllOf.Single());
sb.AppendLine($" : {baseType}");

output($"INHERITED: {className} ({baseType})");
Expand Down

0 comments on commit 7b640ad

Please sign in to comment.