We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 214f22d commit 3b3af5dCopy full SHA for 3b3af5d
src/language/typescript/3.0/serializers/operation-object.ts
@@ -5,6 +5,7 @@ import {
5
getTypeName,
6
getURL,
7
HTTPMethod,
8
+ SUCCESSFUL_CODES,
9
XHRResponseType,
10
} from '../../common/utils';
11
import {
@@ -257,9 +258,9 @@ export const serializeOperationObject = combineReader(
257
258
);
259
260
const serializedResponses = serializeResponsesObject(from)(operation.responses);
-
261
const responseType: XHRResponseType = pipe(
262
- lookup('200', operation.responses),
263
+ array.findFirstMap(code => lookup(code, operation.responses)),
264
chain(response =>
265
ReferenceObjectCodec.is(response)
266
? fromEither(e.resolveRef(response.$ref, ResponseObjectCodec))
0 commit comments