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

Syntax highlighting / validation not switching when response changed content type on subsequent request in same tab #2310

Open
2 tasks done
alefteris opened this issue May 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@alefteris
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

Using bruno 1.17.0.

I'm sending a request to an endpoint that returns a tabular format as text/plain. Then I modify the request to ask for JSON back and the response is returned in application/json.

What's happens:

The response with the JSON content type doesn't get highlighted/validated as JSON. If I switch to some other tab in the response panel, like the Headers tab or Timeline tab, and then back to the Response tab, the editor starts using the correct highlighting/validation for JSON. This workaround also works if I switch to another request tab and then back to the original tab that I'm testing with.

This issue is not specific to the JSON content type, for example if the original response is JSON and the second response is for example XML, the response editor will show a validation error because the returned XML is not valid JSON and will highlight it as JSON.

What should have happened:

The response editor should detect that the response content type is different and apply the appropriate syntax highlighting/validation instantly.

Thanks

.bru file to reproduce the bug

No response

Screenshots/Live demo link

bruno-syntax-bug

@alefteris alefteris added the bug Something isn't working label May 15, 2024
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

1 participant