insomnia
insomnia copied to clipboard
Cannot import resources to existing workspace via `context.data.import.raw`
Expected Behavior
Import resources to existing workspace.
Actual Behavior
Cannot import resources to existing workspace.
Reproduction Steps
await context.data.import.raw(
JSON.stringify({
_type: "export",
__export_format: 4,
resources: [
{
_id: "wrk_1",
name: "New workspace",
_type: "workspace",
},
{
_id: "req_1",
method: "GET",
name: "Test request(New workspace)",
parentId: "wrk_1",
url: "https://insomnia.rest",
_type: "request",
},
{
_id: "req_0",
method: "GET",
name: "Test request(Existing workspace)",
parentId: models.workspace._id,
url: "https://insomnia.rest",
_type: "request",
},
],
})
);
wrk_1
and req_1
are created.
But req_0
is not created anywhere.
context.data.import.raw
https://github.com/Kong/insomnia/blob/018d7dee70b1b29ed372c96d51a721f04c70db74/packages/insomnia/src/plugins/context/data.ts#L46-L57
Is there an existing issue for this?
- [X] I have searched the issue tracker for this problem.
Additional Information
No response
Insomnia Version
2023.4.0
What operating system are you using?
Windows
Operating System Version
Windows 11 22H2
Installation method
download from insomnia.rest
Last Known Working Insomnia version
No response