From fda9f2e84246c0c267621e6ffc5b6862c5fbd10f Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Fri, 11 Mar 2022 23:11:03 +0530 Subject: [PATCH] fix: support patch in openapi, fixes 2138 --- .../hoppscotch-app/helpers/import-export/import/openapi.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/hoppscotch-app/helpers/import-export/import/openapi.ts b/packages/hoppscotch-app/helpers/import-export/import/openapi.ts index 6d76c4e26..2d25f09ba 100644 --- a/packages/hoppscotch-app/helpers/import-export/import/openapi.ts +++ b/packages/hoppscotch-app/helpers/import-export/import/openapi.ts @@ -519,7 +519,7 @@ const convertPathToHoppReqs = ( pathObj: OpenAPIPathInfoType ) => pipe( - ["get", "head", "post", "put", "delete", "options"] as const, + ["get", "head", "post", "put", "delete", "options", "patch"] as const, // Filter and map out path info RA.filterMap( @@ -538,10 +538,10 @@ const convertPathToHoppReqs = ( // We don't need to worry about reference types as the Dereferencing pass should remove them params: parseOpenAPIParams( - (info.parameters as OpenAPIParamsType[]) ?? [] + (info.parameters as OpenAPIParamsType[] | undefined) ?? [] ), headers: parseOpenAPIHeaders( - (info.parameters as OpenAPIParamsType[]) ?? [] + (info.parameters as OpenAPIParamsType[] | undefined) ?? [] ), auth: parseOpenAPIAuth(doc, info),