usebruno / bruno

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

TOML Support #1303

Open helloanoop opened 6 months ago

helloanoop commented 6 months ago

Overview

This discussion aims to explore the possibility of using .toml as the preferred format for saving API request data instead of .bru. For the progression of the Domain-Specific Language (DSL), see https://github.com/usebruno/bruno/discussions/360

I've been seriously exploring how we can represent api requests in toml After careful consideration, factoring in various edge cases, toml seems to fulfil our requirements and might offer better long-term benefits.

Why TOML

Tasks

More Tasks TBD based on how the experiment turns out

Looming Issues

Several features are currently blocked due to limitations in the bru language. Some include:

  1. Describing headers
  2. Managing choices for query parameters
  3. File upload capabilities
  4. Storing multiple payloads within a single request

To address these limitations, I see two potential paths:

  1. Enhance Bru Lang
  2. Utilize TOML

Next Steps

Before choosing a direction, I aim to implement experimental TOML support in our current app within the next 3-4 days (by January 1st, 2024). . BTW I am working on bruno Full Time from Jan 1st :)

Sample GET Request

image

kishaningithub commented 6 months ago

I feel that TOML should be the way forward. Would appreciate more articles on TOML vs bru as you move forward with the next steps.

nateshmbhat commented 4 months ago

any update on this ? this seems very interseting

hp77-creator commented 4 months ago

Hey @helloanoop, just wanted to know did you also explore/consider YAML for the language?

hp77-creator commented 4 months ago

Hey @helloanoop, just wanted to know did you also explore/consider YAML for the language?

My bad, went through #360 , indentation hell 🤔 interesting, I mean at one point it can become that but then at that point your API design is not good, It will be on the type of API imo.

jzorn commented 4 months ago

I think TOML is a better format for humans. It's too easy to mess things up in YAML.