usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
25.28k stars 1.15k forks source link

Allow Export of collection and environments via CLI #2679

Open deepvyas opened 1 month ago

deepvyas commented 1 month ago

I have checked the following:

Describe the feature you want to add

Currently bruno UI has the feature to allow export of a collection (in Postman format,bruno format, OpenAPI Spec ). If the bruno cli could have a command added to allow the same export functionality that would help in scenarios where this is needed to be done programatically.

Mockups or Images of the feature

Commands like: bru export-collection <collection name> and bru export-env <environment name> could be super useful.

lil5 commented 3 weeks ago

This would be great for automatically generating api documentation 👍

CI/CD Push -> Bruno CLI export to openapi -> redoc generates HTML -> caddy docker container hosts the generated HTML.

berlingoqc commented 2 weeks ago

I'll probably start working on something similar. Currently, the export functionality is only to Bruno and Postman, in the GUI. I'll support those but openapi exporter would required a separated issue to add it.

my use case is in my CI to export my bruno collection folder to a single json file to be download as an artifact by consumers of our application.

berlingoqc commented 2 weeks ago

Ok i see that the openApi exporter is in the paid version.

I want to add this feature but since i have only access to the open source code base i think i will only be able to do postmand and bruno.

lil5 commented 2 weeks ago

Exporting to postman then to openapi could be another strategy.

It might even generate a better result than the ui does, which is pretty barebones.