Generates a graph visualisation from Paths in swagger-based (aka OpenAPI) RESTful APIs definitions.
During API maintenance or evolution, Architects and API developers might loose track of the existing resources and path parameters. Keeping the defined API standards is a challenging task if one has either dozens of APIs and/or hundread of methods and paths. A graph visualization of how all API's URLs are structured, with an user friendly view of all resources and path parameters, helps Architects to make better decisions.
- Import from a repository to a database all APIs definitions. We call it "Ingestion";
- Note 1: Currently only SVN (repository) and MongoDB (database) is supported;
- Note 2: It' assumed you have them installed.
- Traverse all Paths from an API in the database and generate a graph such as the one below.
- Note: Graph generation is done using GraphViz, which is assumed it is installed.
Blue nodes represent API resources. Dashed nodes are path parameters. Each Swagger API is presented with a clear gray background.
Colors can be easily customized.
-
Although it's easy to change, Swagger-graph is designed to fetch API definitions form Subversion (SVN) source code repository. Therefore, "as-is" you will need to have all your Swagger files commited to SVN;
-
The requirement for MongoDB works in a similar fashing to SVN. Despite being possible not to use any database and generate graphs right from the JSON Swagger files, I have decided to use a database because the plan for future releases of Swagger-Graph is to build a next generation SOA service catalalog. What does it mean? New collections would be added to the very same database that stores the Swagger JSON documents collection. Those new collections would store all sort of relevant information regarding the APIs their services and capabilities. I plan most of them would be added automatically from the run time environment. That is the general idea.
-
Python 3.5 together with GraphViz and its Python package