darrenc / swagger2puml Goto Github PK
View Code? Open in Web Editor NEWThis project forked from kicksolutions/swagger2puml
Generate Class Diagrams (UML) for Given Swagger Definition
License: Apache License 2.0
This project forked from kicksolutions/swagger2puml
Generate Class Diagrams (UML) for Given Swagger Definition
License: Apache License 2.0
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
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.