fix: support patch in openapi, fixes 2138

This commit is contained in:
Andrew Bastin
2022-03-11 23:11:03 +05:30
parent ace527e21b
commit fda9f2e842

View File

@@ -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),