cancel
Showing results for 
Search instead for 
Did you mean: 

Need Mocking API to be able to control the case for the mock example

Need Mocking API to be able to control the case for the mock example

An API can support several response codes and projections even in an Idempotent operation.  For clients which expect to use the API and mock out the cases, they need to be able to control what case (response) their attempting to exercise.  Having the mocking VertServer cycle through the possible response examples doesn't allow the api developer / integrator or tester to have reproducible results (manually or programmatic ally).  It would be nice if, when making a request, the client could provide a header describing which response case it would like to exercise.  It would also be nice if the virt server baseUrl was not stored as part of the contract and could be turned on or enabled on a request basis so administrators wouldn't have to change the contract just for a client / team to test the mock contract.

2 Comments

This Can be accomplished using our ServiceV tool. ServiceV is an advanced easy to use Virtualization tool. Please see below links for more information:

 

Information about ServiceV:  https://support.smartbear.com/readyapi/docs/servicev/intro/about.html 

 

How to get started: https://support.smartbear.com/readyapi/docs/servicev/tutorials/creating-virt/index.html

 

Getting Dynamic responses (Dependant on Header, Query string, resource or body):  https://support.smartbear.com/readyapi/docs/servicev/configure/dispatch/index.html  

 

Let me know if you have further questions.

Staff

Hi Nohcs777,

 

For SwaggerHub specifically, we're working on the following features for Q3:

1) Allow user to configure how to rotate through responses (200 only, 2xx only, all responses) for a specific API
2) Enable higher throttling rates for paid plans
3) Allow easier integration to Smartbear's ServiceV (the tool mentioned above by Temil).

 

Thanks,

Fernando