Running your API in Swagger
Most importantly, in the upper-right corner is a Try It Out button. Clicking on this button puts Swagger into interactive mode, and allows you to try out your code. When that button is clicked, two other buttons appear: Execute and Clear. Pressing Execute causes the code to run and in our case returns the list of cars, along with some other metadata. Let’s zero in on that (Clear removes the results so that you can try again).
The first thing we see is marked as Curl, as shown in Figure 4.9:
Figure 4.9 – Every Swagger page displays the curl for the endpoint
According to Wikipedia, “Curl combines text markup (as in HTML), scripting (as in JavaScript), and heavy-duty computing (as in Java, C#, or C++) within one unified framework”. We will be ignoring Curl in this book.
Below that, we see the request URL that we submitted to the server, as shown in Figure 4.10:
Figure...