Open joaoportela opened 8 months ago
@sanjai0py @helloanoop This is pretty big, if you ask me, feature currently missing from Bruno.
What is the way to go when working with OpenApi specs that change over time?
IMO Bruno CLI should evolve to give us an option to import/update collections based on an OpenAPI spec.
In Postman, you can import your OpenApi spec, which then generates your collections. If you update the spec, you can then update the collections.
Our use case is that our CI pipelines generates our OpenApi specs from our code. It would then be useful if the CLI could updates our Bruno collections automatically with the newly generated OpenApi.
I would like to use something like this:
bru import --collection {collection_path} --spec-file ./openapi.json
Where bruno update exiting collection and keeps envs, scripts, tests etc. But idk how to handle base_url
env in this case for example. Maybe bruno should be smart about it, and compare path endings?
I'm currently developing an application based on OpenAPI specs that are still in development as well, I'm really mising the option to update the collection based on the new specs. A start could even be throwing away / regenerating the actual request files but keeping everything else e.g. environment configurations.
I can import my openapi.yaml file as a new collection in bruno. But, that's it.
If I generate a new OpenAPI spec file using swagger I have to remove and add the collection again.