Insomnia Designer: how to I export my openAPI spec in a single standalone YAML file?
See original GitHub issueI run Designer 2020.5.2 on macOS Big Sur 11.0.1
I managed to write a working spec but now I’m willing to send it to colleagues who are not working with Designer. So I basically need to send them the YAML file.
I connected Insomnia Designer to a git repo (a GitLab one); this worked, but now I’ve got 2 files inside the .insomnia
folder:
ApiSpec/spc_<some_random_hexa_id>.yml
Workspace/wrk_<another_random_hexa_id>.yml
But the 1st one is not a “pure” openAPI spec because it starts with:
_id: spc_<the_random_hexa_id_above>
type: ApiSpec
parentId: wrk_<the_workspace_hexa_id_seen_above>
modified: <a_numeric_timestamp>
created: <another_numeric_timestamp>
fileName: My API title + version
contents: >
# and now goes the REAL content of my spec!
contentType: yaml
I can’t send this “as is”?!!
I also tried the Preferences menu item > Data tab > “Export Data” button, and when checking “Current Document” I’m let choosing between the few API calls that were automatically generated in the main “Debug” tab (and if I uncheck ALL of them, I can’t Export - button is greyed)
The only option I can resort on is a simple copy-paste, create a new file by hand and save it. That’s absurd?!
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Hi @mxmlnglt! Fortunately you can do this using the companion CLI, inso. Here are some docs for the
export spec
command.You can install and run
Or you can use npx
Let me know how you get on, and thanks for using Designer! It is still relatively new, and I agree the export functionality built into the app needs to be expanded a little. 😄
Our case is a little different so just thought I’d share our situation for the community:
We’d like to
inso export spec
to the native format stored in the Insomnia spec file without knowing which format was used. We have distributed teams publishing Insomnia “workspace” artifacts to a Feed for a Centralizing Pipeline. That pipeline downloads the arbitrary set of Insomnia “workspaces” and publishes Specs (to Developer Portal) that it doesn’t otherwise know much about.The ideal solution for us would be something like this:
inso export spec <id> --filetype native --output spec