From dfa78f448791359de9dc37e095ae6d2812897e06 Mon Sep 17 00:00:00 2001 From: ronanyeah Date: Sun, 19 Apr 2026 02:37:39 -0600 Subject: [PATCH] Handle `application/octet-stream` response --- src/OpenApi/Generate.elm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/OpenApi/Generate.elm b/src/OpenApi/Generate.elm index f6dee69..090d74e 100644 --- a/src/OpenApi/Generate.elm +++ b/src/OpenApi/Generate.elm @@ -1889,9 +1889,12 @@ contentToContentSchema content = let fallback : CliMonad ContentSchema fallback = - CliMonad.succeed - (BytesContent singleKey) - |> CliMonad.withWarning ("Unrecognized mime type: " ++ singleKey ++ ", treating it as bytes") + if singleKey == "application/octet-stream" then + CliMonad.succeed (BytesContent singleKey) + + else + CliMonad.succeed (BytesContent singleKey) + |> CliMonad.withWarning ("Unrecognized mime type: " ++ singleKey ++ ", treating it as bytes") in case singleValue