SpyREST automatically generates REST API documentation based on real API calls. As the name suggests, SpyREST works as a software in the middle between a API client and the API to capture the web traffic. It then adds the necessary sugar and butter to bake the API documentation with enhanced information. You can run the following command to see it in practice:
curl -k -x "http://spyrest.com:9081" \ -H "Accept: application/vnd.github.v3+json" \ -H "x-spy-rest-desc: Searches assembly language repositories for the word tetris" \ "https://api.github.com/search/repositories?q=tetris+language:assembly&sort=stars&order=desc"
And see the generated documentation here
Under the hood this is what happens:
curl
to use SpyREST as a proxy, enabling SpyREST to capture the traffic
-x http://spyrest.com:9081
v3
from the following header
"Accept: application/vnd.github.v3+json"
repositories
from the URL
/search/repositories
x-spy-rest-desc
allows us to provide a description for the API so that SpyREST can display it for its users
"x-spy-rest-desc: Searches assembly language repositories for the word tetris"