-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Expected Behavior
When exporting only an explicitly selected subset of requests the resulting yaml file should contain only the folders that are ancestors of the selected requests.
Actual Behavior
Exported files always store every folder present in the scratchpad
Reproduction Steps
- Create a project structure with multiple folders
- Go to 'Scratch Pad > Export'
- In 'Export requests' select only one request (i.e. 'Leaf A') and press 'Export'
4. Keep export format as 'Insomnia v5' and press 'Done'
5. Observe that yaml file contains info for all the folder created in step 1
5b. Delete every folder/request from scratchpad and reimport yaml file created in step 4 and observe that this created empty folders with no requests:
Is there an existing issue for this?
- I have searched the issue tracker for this problem.
Which sync method do you use?
- Git sync.
- Insomnia Cloud sync.
- Local only
Additional Information
This is arguably working as expected as users can attach scripts to folders and generally speaking someone might structure their requests in such a way that they rely on side effects from scripts from folders not directly related to said requests.
I would argue that inability to export individual folders forces users to ALWAYS export the whole scratchpad because otherwise it's up to user to manually merge current content of their scratchpad with whatever they just imported from the yaml file (e.g. if you don't delete everything in step 5b above you'll end up with duplicates of each folder)
Possible solutions?:
- Export only folder's that are ascendants of selected requests.
- Allow the users explicitly select folders in the export dialog (not just infer what folder to include based no selected requests)
- Maybe change import such that merges folder based on their names?
Insomnia Version
Latest version from github
What operating system are you using?
Ubuntu
Operating System Version
Ubuntu 24.04.3 LTS
Installation method
Built from sources
Last Known Working Insomnia version
N/A