GithubHelp home page GithubHelp logo

darrenc / swagger2puml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kicksolutions/swagger2puml

0.0 0.0 0.0 150 KB

Generate Class Diagrams (UML) for Given Swagger Definition

License: Apache License 2.0

Java 97.99% HTML 2.01%

swagger2puml's People

Watchers

 avatar

swagger2puml's Issues

Multiple types of Error Responses result in an invalid PlantUML diagram

If the swagger specification contains multiple types of error response, the generated PlantUML diagram contains invalid syntax.

For example - below the HTTP 400 response uses an "ErrorMessage" structure and the HTTP 404 response uses a "WarningMessage" structure:

'/cat/{catId}': get: tags: - cat operationId: getCatById parameters: - name: catId in: path required: true type: integer format: int64 responses: '200': description: successful operation schema: $ref: '#/definitions/Cat' '400': description: Invalid ID supplied schema: $ref: '#/definitions/ErrorMessage' '404': description: Cat not found schema: $ref: '#/definitions/WarningMessage'

The resulting PlantUML contains this definition for the relationship which is not valid.

CatApi --> ErrorMessage,WarningMessage

Change method of SVG/PNG image generation

The image generation for SVG is done by invoking the main method of the Run class from the PlantUML library.

This seems to not work well with JUnit tests and is a strange approach to the image file generation.

This enhancement should follow the example from the PlantUml site - http://plantuml.com/api
It uses the class SourceFileReader to read the generated PlantUML file and to generate the resulting image file.

NPE when using multilevel inheritance

Copy of issue kicksolutions#41 on the main repository.

When working with a multi-level composition hierarchy in the Swagger API specification, a Null Pointer Exception is thrown when generating the PlantUML.

This is detailed comprehensively in the Issue above.

This issue will track the commits I make to add the fix from the above issue and also example test cases.

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.