Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] CLI ignores path params in request-urls #2506

Open
2 tasks done
chrisnagel opened this issue Jun 24, 2024 · 1 comment
Open
2 tasks done

[Issue] CLI ignores path params in request-urls #2506

chrisnagel opened this issue Jun 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@chrisnagel
Copy link

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

Thanks to the very useful feature #484 from @game5413, it is now possible to define and use path parmeters.
The feature works as expected in the GUI version of Bruno.

The path parameters are apparently not taken into account in the CLI: A request sent via bru run currently still contains the colon placeholders instead of the defined parameter values.

The issue can be reproduced with V1.19.0 (GUI) and V1.12.0 (CLI).

.bru file to reproduce the bug

meta {
  name: demo
  type: http
  seq: 2
}

get {
  url: https://jsonplaceholder.typicode.com/todos/:num?limit=3
  body: none
  auth: none
}

params:query {
  limit: 3
}

params:path {
  num: 1
}

script:post-response {
  console.log("Request-Url: " + req.url);
}

Screenshots/Live demo link

image
Request-Url sent by Bruno GUI

image
Request-Url sent by Bruno CLI

@chrisnagel chrisnagel added the bug Something isn't working label Jun 24, 2024
@chrisnagel chrisnagel changed the title CLI ignores path params in request-urls [Issue] CLI ignores path params in request-urls Jun 24, 2024
@epestela
Copy link

I also have a small issue:
my path params are defined like this in my OpenApi Yaml file
http://api/rubrics/{id}
when an the request is loaded id is detected as a param and added to path params list
image

however when the query executed the replacement does not work correctly:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants