Giter VIP home page Giter VIP logo

openapi2puml's Introduction

OpenAPI2Puml

OpenApi to Plant UML conversion tool generates UML Class Diagrams from an Open API definition.

This is a fork of the original project Swagger2puml (https://github.com/kicksolutions/swagger2puml) which seems to have been dormant for some time.

This project is based on Maven. Following are modules we currently have

  • openapi2puml-core

Following are the tools which this project internally uses:

  • [Swagger Parser]
  • [Plant UML]
  • [Graphviz]
  • [Mustache]

How does it work

  • Input: Openapi2Puml parses the swagger definition from input using [Swagger Parser]
  • Transform: The swagger definition is built into an object model
  • Output: The object model is transformed into a [Plant UML] file using a [Mustache] template. Optionally a .svg image can be generated also.

openapi2puml-core:

This utility takes OpenAPI Yaml or JSON as input generates swagger.puml and swagger.svg files as output.

Below is the Sample Class Diagram generated by the application. To see the generated PUML file, please click here

Swagger-Class-Diagram-Sample

Building:

mvn package

The jar is built with dependencies and placed in the root of the project.

Usage:

java -jar openapi2puml.jar [options]

-i {Path of Swagger Definition (Can be either Yaml or json)}
-o {Target location where Puml File and Image should generated}
-generateDefinitionModelOnly {true/flase Defult False (Optional)}
-includeCardinality {true/flase Defult true (Optional)}
-generateSvg true/false; Default=true

Dockerized version of OpenAPI2Puml

It is also to use a docker container to run the tool. Simply mount a directory and add command line options by using docker run, e.g.

# Run a docker container
$ sudo docker run -d -p 7000:7000 --name openapi2puml klauswr/openapi2puml:latest

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.