ldabiralai/simulado

Yield responses

Closed this issue · 3 comments

Could we get something like this. Whereby we can yield responses for a given endpoint.

Simulado.mock({
  path: '/account/*',
  status: 200,
  headers: {"Content-Type": 'application/json'},
  yield: [{
    id: 123,
    type: "MOBILE",
    name: "My work phone"
  }, {
    id: 456,
    type: "HOME",
    name: "My home phone"
  }]
}, callback)

I'm not sure about this one.

Personally I think we should try and keep it as simple as we can, and encourage the mocking of similar, endpoints separately. This ensures that the api doesn't become overly complicated to use.

@ldabiralai Do you think this should be a v3 feature for the future?

@alexjfno1 I still think we should encourage mocking individual endpoints as before to keep things simple & easy to understand.So for now I'm going to close this, but happy to revisit if there's further demand for this.