postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.82k stars 837 forks source link

Example response request URL does not update when the request URL is changed #9095

Open amlwwalker opened 4 years ago

amlwwalker commented 4 years ago

Describe the bug

It's hard to know whether the POSTMAN team consider this a feature, however it caused a bug for me, so I'm reporting it as one.

To Reproduce Steps to reproduce the behavior:

  1. Create a new get request at a URL (e.g /api/v1/users/list)
  2. Save the response as an example response to this request
  3. Create mock server, hit the mock url to make sure its responding accordingly.
  4. Change the original request to a new URL (e.g /api/v1/admin/users/list)
  5. Try to make a request on the mock server to this new URL - it won't exist as an endpoint
  6. Change the request URL inside the example to the new one
  7. Now try the mock server again on the new URL - it will work (I think you have to re-create the whole mock server if you change an example, but I'm not sure about this

Expected behavior

I would expect that the request URL for an example is the request URL that the example is associated against.

App information (please complete the following information):

christinecha commented 1 year ago

+1 - this felt like a bug to me! I didn't realize I needed to change the example URL manually (and separately) until I found this issue.