Skip to content

Commit 4e12b64

Browse files
author
Artem Parkhomenko
committed
fix for correct response type codec for 3.0
1 parent 8305dbb commit 4e12b64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/language/typescript/3.0/serializers/response-object.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ export const serializeResponseObject = (
1414
): Option<Either<Error, SerializedType>> =>
1515
pipe(
1616
responseObject.content,
17-
option.mapNullable(content => content['application/json']),
17+
option.mapNullable(
18+
content => content['application/json'] || content['text/plain'] || content['application/octet-stream'],
19+
),
1820
option.chain(media => media.schema),
1921
option.map(schema =>
2022
ReferenceObjectCodec.is(schema)

0 commit comments

Comments
 (0)