Skip to content

Instantly share code, notes, and snippets.

@smsohan
Last active July 8, 2016 14:06
Show Gist options
  • Save smsohan/2f3e6100f5486f4d07c821da47dfb398 to your computer and use it in GitHub Desktop.
Save smsohan/2f3e6100f5486f4d07c821da47dfb398 to your computer and use it in GitHub Desktop.
Swagger SpyREST
Input A static description of the API following the Swagger Specification A set of executable API examples
Output An interactive API explorer showing API structure, Generated API client code An interactive API explorer, showing API structure and examples
Technique Transform a specification file into HTML / Client code Automatically record and transform example API calls into HTML documentation / Client code
Focus Is on API structure, example data is not included Is on API examples, structure is inferred following patterns
Learning Developers need to learn the Swagger Specification Developers need to know how to run example API calls with a proxy and HTTP headers
Maintenance Developers maintain a static swagger specification file Developers maintain automated API examaple runner scripts such as a test suite
Updates Developers manually update the specification when API changes API documentation is auto updated if API changes, examples only need to be updated to introduce new scenarios

If you want, you can use SpyREST to auto generate the Swagger specification for an API. Since, SpyREST infers the API structure from examples, the information can be exported into Swagger specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment