mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 00:58:32 +02:00
Import query parameters from Insomnia v4 and v5 exports (#290)
This commit is contained in:
committed by
GitHub
parent
450dbd0053
commit
4943bad8ec
@@ -122,6 +122,12 @@ function importHttpRequest(r: any, workspaceId: string): PartialImportResources[
|
|||||||
name: r.name,
|
name: r.name,
|
||||||
description: r.description || undefined,
|
description: r.description || undefined,
|
||||||
url: convertSyntax(r.url),
|
url: convertSyntax(r.url),
|
||||||
|
urlParameters: (r.parameters ?? [])
|
||||||
|
.map((p: any) => ({
|
||||||
|
enabled: !p.disabled,
|
||||||
|
name: p.name ?? '',
|
||||||
|
value: p.value ?? '',
|
||||||
|
})),
|
||||||
body,
|
body,
|
||||||
bodyType,
|
bodyType,
|
||||||
authentication,
|
authentication,
|
||||||
|
|||||||
@@ -125,6 +125,12 @@ function importHttpRequest(
|
|||||||
name: r.name,
|
name: r.name,
|
||||||
description: r.meta?.description || undefined,
|
description: r.meta?.description || undefined,
|
||||||
url: convertSyntax(r.url),
|
url: convertSyntax(r.url),
|
||||||
|
urlParameters: (r.parameters ?? [])
|
||||||
|
.map((p: any) => ({
|
||||||
|
enabled: !p.disabled,
|
||||||
|
name: p.name ?? '',
|
||||||
|
value: p.value ?? '',
|
||||||
|
})),
|
||||||
body,
|
body,
|
||||||
bodyType,
|
bodyType,
|
||||||
method: r.method,
|
method: r.method,
|
||||||
|
|||||||
@@ -113,6 +113,13 @@
|
|||||||
"model": "http_request",
|
"model": "http_request",
|
||||||
"name": "New Request",
|
"name": "New Request",
|
||||||
"url": "${[BASE_URL ]}/foo/:id",
|
"url": "${[BASE_URL ]}/foo/:id",
|
||||||
|
"urlParameters": [
|
||||||
|
{
|
||||||
|
"name": "query",
|
||||||
|
"value": "qqq",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"workspaceId": "GENERATE_ID::wrk_d4d92f7c0ee947b89159243506687019"
|
"workspaceId": "GENERATE_ID::wrk_d4d92f7c0ee947b89159243506687019"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -76,6 +76,7 @@
|
|||||||
"sortPriority": -1747414129276,
|
"sortPriority": -1747414129276,
|
||||||
"updatedAt": "2025-05-16T16:48:49.313",
|
"updatedAt": "2025-05-16T16:48:49.313",
|
||||||
"url": "https://httpbin.org/post",
|
"url": "https://httpbin.org/post",
|
||||||
|
"urlParameters": [],
|
||||||
"workspaceId": "GENERATE_ID::wrk_9717dd1c9e0c4b2e9ed6d2abcf3bd45c"
|
"workspaceId": "GENERATE_ID::wrk_9717dd1c9e0c4b2e9ed6d2abcf3bd45c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -98,6 +99,7 @@
|
|||||||
"name": "New Request",
|
"name": "New Request",
|
||||||
"sortPriority": -1747414160498,
|
"sortPriority": -1747414160498,
|
||||||
"updatedAt": "2025-05-16T16:49:20.497",
|
"updatedAt": "2025-05-16T16:49:20.497",
|
||||||
|
"urlParameters": [],
|
||||||
"workspaceId": "GENERATE_ID::wrk_9717dd1c9e0c4b2e9ed6d2abcf3bd45c"
|
"workspaceId": "GENERATE_ID::wrk_9717dd1c9e0c4b2e9ed6d2abcf3bd45c"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -135,6 +135,13 @@
|
|||||||
"name": "New Request",
|
"name": "New Request",
|
||||||
"sortPriority": -1736781406672,
|
"sortPriority": -1736781406672,
|
||||||
"url": "${[BASE_URL ]}/foo/:id",
|
"url": "${[BASE_URL ]}/foo/:id",
|
||||||
|
"urlParameters": [
|
||||||
|
{
|
||||||
|
"name": "query",
|
||||||
|
"value": "qqq",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"workspaceId": "GENERATE_ID::wrk_c1eacfa750a04f3ea9985ef28043fa53"
|
"workspaceId": "GENERATE_ID::wrk_c1eacfa750a04f3ea9985ef28043fa53"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user