fix: tiny issues with importers

This commit is contained in:
Andrew Bastin
2022-01-14 21:12:29 +05:30
parent 588d1119b5
commit 1719bb7bc9
3 changed files with 4 additions and 4 deletions

View File

@@ -180,7 +180,7 @@ const getHoppReqParams = (req: InsomniaRequestResource): HoppRESTParam[] =>
const getHoppRequest = (req: InsomniaRequestResource): HoppRESTRequest =>
makeRESTRequest({
name: req.name ?? "Untitled Request",
method: req.method ?? "GET",
method: req.method?.toUpperCase() ?? "GET",
endpoint: replaceVarTemplating(req.url ?? ""),
auth: getHoppReqAuth(req),
body: getHoppReqBody(req),

View File

@@ -531,8 +531,8 @@ const convertPathToHoppReqs = (
// Construct request object
RA.map(({ method, info }) =>
makeRESTRequest({
name: info.operationId ?? "Untitled Request",
method,
name: info.operationId ?? info.summary ?? "Untitled Request",
method: method.toUpperCase(),
endpoint: `<<baseUrl>>${replaceOpenApiPathTemplating(pathName)}`, // TODO: Make this proper
// We don't need to worry about reference types as the Dereferencing pass should remove them

View File

@@ -214,7 +214,7 @@ const getHoppRequest = (item: Item): HoppRESTRequest => {
return makeRESTRequest({
name: item.name,
endpoint: getHoppReqURL(item),
method: item.request.method,
method: item.request.method.toUpperCase(),
headers: getHoppReqHeaders(item),
params: getHoppReqParams(item),
auth: getHoppReqAuth(item),