protean icon indicating copy to clipboard operation
protean copied to clipboard

Use input as output for out-the-box sim

Open colin-lamed opened this issue 9 years ago • 3 comments

If an input placeholder also appears as output placeholder, should out the box sim default to returning it?

For example, I have a query parameter which also appears in the response Location header. I have created a sim to do this, since the default behaviour is to ignore the input value, and generate a random response value.

colin-lamed avatar Aug 16 '16 09:08 colin-lamed

Can we make the assumption that the param means the same in both places ? Is it possible it could mean something different in the response ?

rossajmcd avatar Aug 16 '16 09:08 rossajmcd

It's possible - but since we can always override with a sim, we should support the most probable.

Another example case could be including the resource id in the response that is used in the get url.

colin-lamed avatar Aug 16 '16 10:08 colin-lamed

OK sounds sensible the former... trying to imagine the latter... but presumably this is a use case affecting you somehow so a sensible default behaviour would be good.

rossajmcd avatar Aug 16 '16 11:08 rossajmcd