Kong / Kong/insomnia

Cannot generate collections from OpenAPI spec

Open
#8,126 1 comment 1 reaction 0 assignees View on GitHub
B-bug S-unverified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

### Expected Behavior

I should be able to generate collection from imported OpenAPI spec.

### Actual Behavior

When I try to genenerate collection I get this error:

![image](https://github.com/user-attachments/assets/d6ded339-82ec-4823-8822-905b817176c0)

```
Error: Error Generating Configuration at Object.Pt [as generateCollectionFromApiSpecAction] (file:///C:/Users/jako/AppData/Local/insomnia/app-10.1.1/resources/app.asar/actions-BZVlCwhF.js:5:2490) at async file:///C:/Users/jako/AppData/Local/insomnia/app-10.1.1/resources/app.asar/mainWindow-CwAvrReO.js:56:5992 at async callLoaderOrAction (file:///C:/Users/jako/AppData/Local/insomnia/app-10.1.1/resources/app.asar/mainWindow-CwAvrReO.js:56:6495) at async Promise.all (index 0) at async defaultDataStrategy (file:///C:/Users/jako/AppData/Local/insomnia/app-10.1.1/resources/app.asar/mainWindow-CwAvrReO.js:56:4881) at async callDataStrategyImpl (file:///C:/Users/jako/AppData/Local/insomnia/app-10.1.1/resources/app.asar/mainWindow-CwAvrReO.js:56:5434) at async en (file:///C:/Users/jako/AppData/Local/insomnia/app-10.1.1/resources/app.asar/mainWindow-CwAvrReO.js:55:34136) at async jr (file:///C:/Users/jako/AppData/Local/insomnia/app-10.1.1/resources/app.asar/mainWindow-CwAvrReO.js:55:29684)
```

On second try "Generate collection" menu item is disabled:

![image](https://github.com/user-attachments/assets/f5accd2f-1f59-485f-aa35-0fed2568b669)

### Reproduction Steps

1. Create empty design document
2. Download https://api.ibkr.com/gw/api/v3/api-docs
3. Copy paste OpenAPI spec from downloaded file (since we #7885)
4. Click on "Generate collection"
363192280-598a5e47-a1f5-43cb-8cfc-da411cf77f3b

### Is there an existing issue for this?

- [X] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.

### Additional Information

It seems that "Generate collection" is disabled as soon as validation finishes with errors. But this is working spec and it should not block generating collection.

### Insomnia Version

10.11.1

### What operating system are you using?

Windows

### Operating System Version

Windows 10 Pro 22H2 [Version 10.0.19045.5011]

### Installation method

winget

### Last Known Working Insomnia version

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at the Generate collection action and the validation flow described in the issue, then reproduce with the IBKR OpenAPI document from the provided URL on Windows. Done means the collection can be generated after importing this working spec, and the Generate collection menu remains available after validation completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.