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.