Skip to content

Commit 5ba0ebd

Browse files
authored
Merge pull request #301 from ronanyeah/feat/octet-header
Handle `application/octet-stream` response
2 parents 3b2a786 + dfa78f4 commit 5ba0ebd

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎src/OpenApi/Generate.elm‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,9 +1889,12 @@ contentToContentSchema content =
18891889
let
18901890
fallback : CliMonad ContentSchema
18911891
fallback =
1892-
CliMonad.succeed
1893-
(BytesContent singleKey)
1894-
|> CliMonad.withWarning ("Unrecognized mime type: " ++ singleKey ++ ", treating it as bytes")
1892+
if singleKey == "application/octet-stream" then
1893+
CliMonad.succeed (BytesContent singleKey)
1894+
1895+
else
1896+
CliMonad.succeed (BytesContent singleKey)
1897+
|> CliMonad.withWarning ("Unrecognized mime type: " ++ singleKey ++ ", treating it as bytes")
18951898
in
18961899
case
18971900
singleValue

0 commit comments

Comments
 (0)