Export - body object is recursed
- Dominant language
- TypeScript
- Stars
- 40k
- Forks
- 2.4k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
### Expected Behavior
When I export my collection using V5 YAML, I'll be able to import that file back. Exported data is valid.
### Actual Behavior
2 of almost 500 requests in my v5 YAML export have recursed or nested object which avoids to import the file back.
After I click Scan error occured:
```
No importers found for file
```
Example of broken result:
```
- url: "{{http_host}}/api/login"
...
method: POST
body:
mimeType: application/json
text:
mimeType: application/json
text: |-
{
"login": "{{ login }}",
"password": "{{ password }}"
}
headers:
- name: Content-Type
value: application/json
...
```
```
- url: "{{http_host}}/api/otherRequest"
name: getQrCode
...
method: GET
body:
mimeType: text/plain
text:
mimeType: text/plain
text: ""
headers:
- name: Content-Type
value: text/plain
...
```
### Reproduction Steps
When I manually edit bodies to:
```
body:
mimeType: application/json
text: |-
{
"login": "{{ owner_login }}",
"password": "{{ owner_password }}"
}
```
and
```
body:
mimeType: text/plain
text: ""
```
importing is possible.
### Is there an existing issue for this?
- [x] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.
### Which sync method do you use?
- [ ] Git sync.
- [ ] Insomnia Cloud sync.
- [ ] Local only
### Additional Information
Version: Insomnia 11.4.0
Build date: 7/30/2025
OS: Darwin arm64 24.6.0
Electron: 35.1.5
Node: 22.14.0
Node ABI: 133
V8: 13.4.114.21-electron.0
Architecture: arm64
### Insomnia Version
11.4.0
### What operating system are you using?
macOS
### Operating System Version
15.6.1 (24G90)
### Installation method
downloaded .dmg
### Last Known Working Insomnia version
_No response_
Contributor guide
Research direction
Start by tracing the V5 YAML export and import paths, then reproduce the nested body output using the examples in this issue. Confirm that exported request bodies no longer contain duplicated mimeType/text objects and that the resulting file can be imported successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100