From f7d3cb6cd0eed25f0f3778a4d35f66f4a05306ff Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 2 Jul 2023 19:44:45 +0200 Subject: [PATCH] dynamite: Support application/octet-stream content type --- packages/dynamite/dynamite/lib/src/openapi_builder.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/dynamite/dynamite/lib/src/openapi_builder.dart b/packages/dynamite/dynamite/lib/src/openapi_builder.dart index 764d2a71..e37d5a6f 100644 --- a/packages/dynamite/dynamite/lib/src/openapi_builder.dart +++ b/packages/dynamite/dynamite/lib/src/openapi_builder.dart @@ -622,7 +622,9 @@ class OpenAPIBuilder implements Builder { ); state.resolvedTypeCombinations.add(result); - if (mimeType == '*/*' || mimeType.startsWith('image/')) { + if (mimeType == '*/*' || + mimeType == 'application/octet-stream' || + mimeType.startsWith('image/')) { dataType = 'Uint8List'; dataValue = 'response.bodyBytes'; } else if (mimeType.startsWith('text/')) {