From fb565ca9f4dc89641923d1628bce2c1bbe61fe42 Mon Sep 17 00:00:00 2001 From: Daichi Imamori Date: Tue, 27 Apr 2021 14:26:06 +0900 Subject: [PATCH] Support redirect status code --- src/buildV3.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buildV3.ts b/src/buildV3.ts index fcf2cc39..31181a7a 100644 --- a/src/buildV3.ts +++ b/src/buildV3.ts @@ -169,7 +169,7 @@ export default (openapi: OpenAPIV3.Document) => { } if (target.responses) { - const code = Object.keys(target.responses).find(code => code.startsWith('20')) + const code = Object.keys(target.responses).find(code => code.match(/^(20\d|30\d)$/)) if (code) { params.push({ name: 'status',