Ask a Question

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.

3 Comments
TSanchez_1
Moderator

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.

fbmattos
SmartBear Alumni (Retired)

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

TanyaYatskovska
SmartBear Alumni (Retired)
Status changed to: Implemented
 
Announcements
Welcome to the SwaggerHub Feature Requests board!

Here you can review already submitted feature requests and vote up the ones you like! If you can't find the feature you want - go ahead and suggest your own idea. Ideas with the highest rating can be implemented in the product.

Check out the Create a Feature Request guide for more information.
New Here?
Welcome to the Community
Sign Up Here