Skip to content

Avinger27/pikturr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pikturr

Why?

swagger is great tool to describe your restful api in a clear and structured way. But as the spec gets longer and longer it could be sometimes useful to zoom out and look at your api from 10,000 feet.

pikturr is a very simple tool to transform your swagger api spec into a simple uml class diagram.

What?

I'm new to the javascript and node party. So please be patient and do not expect the ultra efficient javascript ninja code. I find a visual representation of an api spec useful and I want to learn js and node...so I wrote this tool. It's as simple as that.

How?

Because pikturr makes use of node-plantuml, which in turn makes use of...ehhh...plantuml, you have to fulfill some preconditions:

  • you need to have the java executable in your path
  • you must have graphviz installed
  • the GRAPHVIZ_DOT environment variable must point the dot executable of graphviz

That's it for now.

Just get the code, look inside and you'll find out.

From the command line:

cd pikturr
npm install
// supply the url of the swagger as an argument
node index.js 'http://petstore.swagger.io/v2/swagger.yaml'

As a module:

const pikturr = require(pikturr)
pikturr.generate('http://petstore.swagger.io/v2/swagger.yaml')

class diagram for the pet store api

What next?

  • re-structure code to meet nodejs project structure standards
  • add some tests
  • provide a rest api
  • provide a simple web frontend
  • provide some configurable options

About

Simple tool to turn a swagger api spec into a uml class diagram.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%