Open victoraugustofd opened 1 month ago
I was reviewing this PR #6044 as already mentioned and confirmed that the ImportOptions do not exist anymore and creating a new workspace is the expected behaviour. I thought on creating a PR to change this, however I would like to know for what purpose this was removed from the code, since it removes a great import feature and perhaps there is a reason behind it and a PR returning this feature to the code would be pointless. Also, the documentation is confirmed to be outdated as well, leading to misunderstanding.
I just sent a PR to update the documentation: #insomnia-docs/pull/207.
Expected Behavior
Following the documentation, data context import function can receive an argument of type ImportOptions, which has an id corresponding to the workspace that the import should be executed at.
Actual Behavior
Even if I pass a valid workspaceId on the ImportOptions argument, the import occurs, but it creates a new workspace instead of importing the contents on the actual workspace.
Reproduction Steps
Create a plugin with minimal code in index.js eg:
Credits to @sebastiande for the code snippets for reproduction steps.
Is there an existing issue for this?
Additional Information
I don't think this should be the expected behaviour, or the documentation should be updated as it leads developers to assume that this behaviour is what was going to happen. On my case, I am developing an internal plugin for the company that I work, and this is a blocker that I could not imagine when I was studying what the Insomnia plugins are capable of. This was already discussed at #6125, however I don't think that the main issue was understood, since "sync" features started being discussed on the thread, even though the discussion was about importing contents of an exported collection/design document on the current workspace. Also, I searched on the source code of Insomnia and did not find any occurrence of the string "ImportOptions" on the code, which make me think this is a deprecated feature and the documentation is outdated. Is it correct to assume any of this or is this a known issue that is already under fix from Insomnia team collaborators?
Thanks in advance.
Insomnia Version
2023.5.5
What operating system are you using?
Windows
Operating System Version
Microsoft Windows 11 Pro
Installation method
download from insomnia
Last Known Working Insomnia version
No response