Skip to content

Commit e914a4e

Browse files
add support for response header rendering for status code 204
1 parent 1d35a14 commit e914a4e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/openApi/v3/parser/getOperationResults.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export const getOperationResults = (operationResponses: OperationResponse[]): Op
1818
if (code && code !== 204 && code >= 200 && code < 300) {
1919
operationResults.push(operationResponse);
2020
}
21+
// If response code is 204 and we are expecting something in header lets add
22+
else if(code === 204 && operationResponse.in === "header"){
23+
operationResults.push(operationResponse);
24+
}
2125
});
2226

2327
if (!operationResults.length) {

0 commit comments

Comments
 (0)