question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Insomnia Designer: how to I export my openAPI spec in a single standalone YAML file?

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
develohpandacommented, Jan 11, 2021

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

npm i -g insomnia-inso
inso export spec <name-or-id-or-blank> --output spec.yaml

Or you can use npx

npx insomnia-inso export spec <name-or-id-or-blank> --output spec.yaml

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. 😄

0reactions
waciii-racommented, Apr 14, 2021

Not right now, although this would be a pretty awesome (and simple) feature to add to inso. I can provide some pointers if you would be interested in adding it! Something like inso export spec <id> --format json --output spec.json.

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Insomnia Designer: how to I export my openAPI spec in a single ...
Insomnia Designer: how to I export my openAPI spec in a single standalone YAML file ? ... So I basically need to send...
Read more >
How to Create Documentation for Your REST API with Insomnia
In this tutorial, you will document your API using the OpenAPI specification (v3). An OpenAPI file is a JSON or YAML file that...
Read more >
An honest review of Insomnia Designer and Insomnia Core
Neither support imports from API Blueprint (Apiary), so Apiary users must export (most likely to Swagger/OpenAPI) for compatibility. Export: Insomnia, shame on ...
Read more >
inso export spec | Insomnia Docs
The inso export spec command extracts and exports the raw OpenAPI specification from the data store. If the --output option is not specified,...
Read more >
Open-source collaborative editor for API design | Hacker News
I love Insomnia and use it almost daily and in the hope the ... with importing OAS 3/yaml APIs making heavy use of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found