From the course: Building APIs with Swagger and the OpenAPI Specification

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Auto Mocking APIs

Auto Mocking APIs - REST Tutorial

From the course: Building APIs with Swagger and the OpenAPI Specification

Start my 1-month free trial

Auto Mocking APIs

Swagger supports the ability to mock APIs Let's take a look at this feature in action. by clicking on the view documentation where we can go ahead and execute a request against this API operation. You'll notice that we are able to see the response You'll notice that we are able to see the response provided back from the API and that's because SwaggerHub is providing this virtual server that's mocking the API. is providing this virtual server that's mocking the API. So, if we grab this URL and we copy it and put it into the browser, you'll notice that we get some JSON returned. So if you're an API consumer of this API, you can go ahead and program against this contract while the API implementation is being developed. Now, if we navigate back to MYhub and look at our catalog API, we can go into the Swagger UI docs and if we take a look at one of these operations on the API, you'll notice our try it now button is missing, and that's because…

Contents