How do I simulate a given Swagger example response value in API Studio?

Not applicable

http://playground.apistudio.io/173a311c-945b-43c1-9cdd-24734a89c372

I've added an example to the /hello resource to to simulate the response {"message": "Hello, world!"}, but I get {"message": "Sample text"} when making a request through "Try this operation" in the right panel.

Solved Solved
1 3 1,814
1 ACCEPTED SOLUTION

Dear @Yegor Pomortsev ,

Response logic of the hello world api is defined in hello_world.js controller file hello function. Right now, these files are not editable using API Studio due to beta release. But, You can able to launch your own API Studio on local machine using much more powerful apigee-127 open source tool. You can get started with apigee-127 here. Check out the videos.

API Studio you see now is just the first beta release, and there’s still lots of stuff we need to add, but we think you’ll find it pretty useful and we want to hear your feedback as you try it out. We’ll release new capabilities iteratively in the coming weeks and months.

Cheers,

Anil Sagar

View solution in original post

3 REPLIES 3

Dear @Yegor Pomortsev ,

Response logic of the hello world api is defined in hello_world.js controller file hello function. Right now, these files are not editable using API Studio due to beta release. But, You can able to launch your own API Studio on local machine using much more powerful apigee-127 open source tool. You can get started with apigee-127 here. Check out the videos.

API Studio you see now is just the first beta release, and there’s still lots of stuff we need to add, but we think you’ll find it pretty useful and we want to hear your feedback as you try it out. We’ll release new capabilities iteratively in the coming weeks and months.

Cheers,

Anil Sagar

Dear @Yegor Pomortsev ,

API Studio allows you to play with existing APIs and create documentation for your APIs. If you already have your own hello world API then you can use API studio to generate documentation as well as play with your API.

See an example here in API Studio where we display PET Store API which connects to API service petstore.swagger.wordnik.com . Similarly, You can connect with your hello world API if it is already hosted some where. If you are looking for free API hosting platforms then you can use Apigee Edge and expose your API using Apigee Edge Node.js containers.

Cheers,

Anil Sagar

Not applicable

We will have what you are asking in about 2 weeks time period where mock server will honor the example you have in your Swagger spec. Overall mock server is going to get better.