Repository navigation
Closed
Labels
PA-insoPackage: Insomnia Inso CLI
Description
Hi!
Scenario
- API hosted on Github, team uses Insomnia to work on it
- API documentation served on my webhost, using Insomnia-Documenter https://www.npmjs.com/package/insomnia-documenter, with latest fixes by me it runs smoothly in every cases
Problem
Insomnia Documenter uses the export json file to create a nice looking documentation: https://api.projectalice.io/ . This json file can be obtained by exporting the Insomnia data as in: application => preferences => data => export, but not programatically using inso cli. This leads to me having to pull the latest changes made by the team, daily, export the data and upload it to my webhost.
Possible solutions
- CLI command to export the data, in the
insonpm package. This would allow Github actions to install the CLI and export the data in the desired format.
- PROS: integrated
- CONS: one more step
- The Insomnia "push" function does, if setting enabled to, export the data and include them in the commit/push
- PROS: totally transparent, no extra steps, awesome
- CONS: not intuitive as includes extra data to a commit without the user to be really aware of it. Would also need branch settings and others.
- Have insomnia documenter use not the exported data, but the raw data available on Github
- PROS: Nothing for you guys to do, works out of the box
- CONS: Unlikely to happen as the documenter dev is very busy
- Feel free to add in comments
Benefits
Having such a function would allow a totally automated workflow when pushing new data on the API repo, allowing everyone to generate nice documentation without any hassle. I must say, it competes easily with Postman
Reacted by Scott Mackie, Nova, Akash Amat and Marvin Heilemann
Metadata
Metadata
Assignees
Labels
PA-insoPackage: Insomnia Inso CLI
Activity
nijikokun commentedon Dec 14, 2020
I think this is definitely something suited for Inso, as we have export functions for Designer but not Core.
smacktoid commentedon Jan 20, 2021
I like this idea. I'm spending a lot of time at the moment maintaining a set of exported insomnia workspaces for my team. We're updating the collections regularly and exporting them back to the git repository is a pain once you've done it for the tenth time in a day.
develohpanda commentedon Jan 21, 2021
Hi @scottmmmm, have you explored using the Git sync functionality within Designer? It will sync directly to a git repository, instead of having to manually export your workspace and commit into git. https://support.insomnia.rest/article/96-git-sync
smacktoid commentedon Jan 21, 2021
Thanks for the suggestion. We can't use Designer for this as we don't use OpenAPI. We use Core to create a set of requests that show how each of our APIs work.
develohpanda commentedon Jan 21, 2021
Oh! You can still use Designer, just don't write a specification and go straight to the debug tab. You can export your workspace(s) from Core and import into Designer, and use the requests as-is without OpenAPI.
We are looking to consolidate the sync systems soon, but as an interim solution. 😊
smacktoid commentedon Jan 21, 2021
That is interesting. Hadn't realised the designer could be used in that way.
Unfortunately issue 2639 means I can't use git sync with our corporate git repository, but if that ever gets resolved it looks promising.
muuvmuuv commentedon Apr 26, 2021
We would also benefit from that. We have our public API on GitLab with Git sync and to debug and test local instances we use a
insomnia.json. With that I don't need that extra steps to go to settings → export data.