Open eznix86 opened 4 months ago
Heyo, just to put this out of the way, Restfox already has a file workspaces feature as of https://github.com/flawiddsouza/Restfox/releases/tag/v0.7.0. It allows you to have each request and folder as a file and a folder in your file system. So that you can have put it all in a git repo.
Workspaces are broken down into real folders (usebruno/github-rest-api-collection@main/Repository/Search%20Repos.bru)
Is it necessary for that project? Not necessary but it is great to just have a folder with everything which can be version controlled and edited.
So this feature you mention is already present.
But the point of a DSL might still be valid. But it is a lot of work. I have thought of supporting .bru directly. I'm undecided. This issue can serve as the basis for the spec for the DSL.
Oh thanks for pointing out ! I will try out this feature!
I believe supporting .bru is quite q challenge especially if the specifications keeps changing because they are new.
supporting bru files can be quite a good thing! let me explain why it can be helpful for our development flow for example:
I have services in different repositories and each of them have docs/api_collection
folder that has the bru files in it.
npm run . --test-only
on the CI to validate the queries are still working.with Restfox however, what we can achieve:
after nr3, I can host an internal restfox that is based on the aggregated collection instead of the Desktop app.
also if possible, after nr1, I could do restfox docs/api_collection
that opens a browser for the given repository, just not sure modification of the files will also be effecting the bru files directly.
interesting point of view, so I believe support for .bru is much more interesting than making a restfox version.
I've always wanted to have bru support in Restfox, so this works for me.
Instead of exporting data in JSON, which is quite verbose, we can introduce a RestFox DSL. Similar to .bru.
We can have a hydrator in between from current JSON implementation to the DSL. Making easy to convert the JSON into a DSL and DSL back to JSON for import so it does not change anything.
Advantages of having a DSL instead of passing a JSON around.
Example: https://github.com/usebruno/bruno/blob/main/packages/bruno-lang/v2/src/collectionBruToJson.js
References: https://docs.usebruno.com/bru-lang/tag-reference
Questions to reflect upon:
My personal reflection on these: