usebruno / bruno

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

Importing postman collection does not get examples #2256

Open arvindkgs opened 4 months ago

arvindkgs commented 4 months ago

I have checked the following:

Describe the bug

Importing postman collection does not seem to import the examples under a request. Looks like the example is stored in responses.

Example: { "name": "Get Branding", "request": { "method": "GET", "header": [], "url": "" }, "response": [ { "name": "Get Customised 'Banner", "originalRequest": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "x-id-endpoint", "value": "e6f9603a-1bbd-4fee-ad13-477e159ad5c5", "type": "text" } ], "url": { "raw": "http://localhost:4000/api/v2/users/brand-customization?sessionId=bd1e7831-d1c1-471e-b4bf-8d50baa0d99b", "protocol": "http", "host": [ "localhost" ], "port": "4000", "path": [ "api", "v2", "users", "brand-customization" ], "query": [ { "key": "sessionId", "value": "bd1e7831-d1c1-471e-b4bf-8d50baa0d99b" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-XSS-Protection", "value": "1; mode=block" }, { "key": "Cache-Control", "value": "no-cache, no-store, max-age=0, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Expires", "value": "0" }, { "key": "X-Frame-Options", "value": "DENY" }, { "key": "Content-Type", "value": "application/json;charset=UTF-8" }, { "key": "Transfer-Encoding", "value": "chunked" }, { "key": "Date", "value": "Wed, 21 Feb 2024 04:49:14 GMT" }, { "key": "Keep-Alive", "value": "timeout=60" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "" } ] }

![Uploading Screenshot 2024-05-07 at 12.35.27.png…](Postman example) Adding example in postman -

Screenshot 2024-05-07 at 12 35 47

Imported request in Bruno

Screenshot 2024-05-07 at 12 35 36

.bru file to reproduce the bug

meta { name: Get Branding type: http seq: 5 }

get { url: body: none auth: none }

Screenshots/Live demo link

Postman example response

Screenshot 2024-05-07 at 12 35 47 Screenshot 2024-05-07 at 12 35 27
Yasnovskiy commented 1 month ago

Greetings, if this feature can be added, that would be greatly appreciated.

kartik1112 commented 1 month ago

@sanjai0py i would like to work on this issue can i get some help starting ?

helloanoop commented 1 month ago

@kartik1112 please see #1235