Skip to content

Commit 0720231

Browse files
committed
Use the setting passed as the default content type if global and local produces are missing
1 parent 73c11c5 commit 0720231

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.OpenApi.Readers/V2/OpenApiResponseDeserializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private static void ProcessProduces(MapNode mapNode, OpenApiResponse response, P
7474

7575
var produces = context.GetFromTempStorage<List<string>>(TempStorageKeys.OperationProduces)
7676
?? context.GetFromTempStorage<List<string>>(TempStorageKeys.GlobalProduces)
77-
?? new List<string> { "application/octet-stream" };
77+
?? context.DefaultContentType ?? new List<string> { "application/octet-stream" };
7878

7979
var schema = context.GetFromTempStorage<OpenApiSchema>(TempStorageKeys.ResponseSchema, response);
8080

0 commit comments

Comments
 (0)