All Projects → opendata-for-all → wapiml

opendata-for-all / wapiml

Licence: EPL-2.0 license
An OpenAPI round-trip tool that leverages model-driven techniques to create, visualize, manage, and generate OpenAPI definitions.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to wapiml

Asciidoctor Kroki
Asciidoctor.js extension to convert diagrams to images using Kroki!
Stars: ✭ 55 (-9.84%)
Mutual labels:  diagram, uml
C4 Plantuml
C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures
Stars: ✭ 3,522 (+5673.77%)
Mutual labels:  diagram, uml
Vscode Mermaid Preview
Previews Mermaid diagrams
Stars: ✭ 111 (+81.97%)
Mutual labels:  diagram, uml
Arkit
JavaScript architecture diagrams and dependency graphs
Stars: ✭ 671 (+1000%)
Mutual labels:  diagram, uml
jsonSchema-to-uml
A tool to generate UML class diagrams from JSON schema documents
Stars: ✭ 33 (-45.9%)
Mutual labels:  eclipse, uml
Protobuf Uml Diagram
Create UML diagrams from Protobuf compiled .proto files using Python
Stars: ✭ 17 (-72.13%)
Mutual labels:  diagram, uml
Umldoclet
Automatically generate PlantUML diagrams in javadoc
Stars: ✭ 138 (+126.23%)
Mutual labels:  diagram, uml
idle
parse source code(objective-c, java) generate uml(class diagram)
Stars: ✭ 44 (-27.87%)
Mutual labels:  diagram, uml
C4-PlantumlSkin
This library provides skinning to create C4 diagrams using PlantUml
Stars: ✭ 74 (+21.31%)
Mutual labels:  diagram, uml
Azure Plantuml
PlantUML sprites, macros, and other includes for Azure services
Stars: ✭ 247 (+304.92%)
Mutual labels:  diagram, uml
Aws Plantuml
PlantUML sprites, macros, and other includes for AWS components.
Stars: ✭ 565 (+826.23%)
Mutual labels:  diagram, uml
uml-diagram-for-kotlin-design-pattern-examples
UML diagram list of GoF design pattern examples written in Kotlin.
Stars: ✭ 23 (-62.3%)
Mutual labels:  diagram, uml
Gaphor
Gaphor is the simple modeling tool
Stars: ✭ 386 (+532.79%)
Mutual labels:  diagram, uml
Uml Diagram For Python Design Pattern Examples
UML diagram list of GoF design pattern examples written in Python.
Stars: ✭ 40 (-34.43%)
Mutual labels:  diagram, uml
Jetuml
A desktop application for fast UML diagramming.
Stars: ✭ 346 (+467.21%)
Mutual labels:  diagram, uml
Nomnoml
The sassy UML diagram renderer
Stars: ✭ 1,685 (+2662.3%)
Mutual labels:  diagram, uml
Kaizen Openapi Editor
Eclipse Editor for the Swagger-OpenAPI Description Language
Stars: ✭ 97 (+59.02%)
Mutual labels:  eclipse, openapi
Amateras Modeler
UML and ER-diagram editor for Eclipse
Stars: ✭ 190 (+211.48%)
Mutual labels:  eclipse, uml
Plantuml Icon Font Sprites
plantuml-font-icon-sprites
Stars: ✭ 242 (+296.72%)
Mutual labels:  diagram, uml
uml2solidity
A uml profile and a set of acceleo code generators to model smart contracts in uml and generate solidity code.
Stars: ✭ 35 (-42.62%)
Mutual labels:  eclipse, uml

WAPIml

Build Status Version 1.1.0 Badge License Badge

WAPIml is an OpenAPI round-trip tool that leverages model-driven techniques to create, visualize, manage, and generate OpenAPI definitions. WAPIml embeds an OpenAPI metamodel but also a UML profile to enable working with OpenAPI in any Eclipse UML-compatible modeling tool.

N.B. The legacy tool OpenAPItoUML, which generates UML models from OpenAPI definitions, can be found under the branch openapi-to-uml.

Requirements

  • Eclipse Modeling tools (it can be found here).
  • Papyrus to visualize the UML model and manage the profile.

Installation

  1. Open Eclipse IDE
  2. Click on Help / Install New Software...
  3. Click on Add... and fill in the form as indicated (the update site is https://opendata-for-all.github.io/wapiml/update/wapiml/) then click on OK.

Note: It's normal to get a 404 page if you open the link in the browser (there is no index.html page in the update site directory).

Add repository

  1. Select WAPIlml then click on Next.

Install

  1. Follow the the rest of the steps (license, etc...) and reboot Eclipse.

Using the plugin

Generating UML models
  1. Create a Project or use an existing project in your workspace.
  2. Import your OpenAPI 2 definition into the project (we support both JSON and YAML).
  3. Right-click on the definition file and select WAPIml/Generate a class diagram to start. This will initiate a wizard to guide the generation process. The first page of the wizard is shown below.

page1

  1. Check Apply the OpenAPI profile if you want to enrich your UML model with OpenAPI stereotypes (this mandatory if you want to generate an OpenAPI definition later) and check Discover associations if you want the process to discover implicit associations by analyzing schema properties (note: this only concerns the association that are not explicitly defined. Explicit associations will be included in the model either way).
  2. Click on Next. This will display the second page of the wizard.

page1

  • The first table includes the explicit associations defined using JSON Schema (properties of type object or array of objects). You could change the aggregation kind of an association by clicking on its row (the default one is composite).
  • The second table shows the discovered associations which are not explicity defined in the definition. You could change the aggregation kind and the target property. You could also delete the association using a right-click on the row of the association and selecting Delete Selection.
  1. Click on Finish. The generated model are located under the folder src-gen
Modeling OpenAPI definitions using Papyrus

From a generated model:

  1. Open the perspective Papyrus.
  2. Right-click on the generated UML model and select New -> Papyrus Model.
  3. Follow the steps in the wizard to initialize a Class diagram (keep everything as predefined except in the Initialization information step where you should check Class Diagram as the Respresentation kind).
  4. Drag-and-drop the UML elements from the Model Explorer into the editor.
  5. Align and arrange the layout as you prefer.
  6. Save.

Petstore

From scratch:

  1. Open the perspective Papyrus.
  2. Click on File then select New -> Papyrus Model.
  3. Follow the steps in the wizard to initialize a Class diagram (keep everything as predefined except in the Initialization information step where you should check Class Diagram as the Representation kind and click on Browse Registered Profiles and select OpenAPI as shown below).

profile

  1. Add UML elements to the canvas.
  2. Use the the Properties view to apply the stereotypes and set the tag values (see an example below).

Properties views

Generate an OpenAPI definition from an annotated UML model
  1. Switch to the perspective Java.
  2. Right-click on the annotated UML model and select WAPIml -> Generate an OpenAPI definition in JSON format to generate the definition in JSON or WAPIml -> Generate an OpenAPI definition in YAML format to generate the definition in YAML.

The generated OpenAPI definition will be located under the folder src-gen.

Notes

  • Each schema definition (#/definitions) of type object is represented as a class.
  • The location of an operation (i.e., in which class it should be) is decided based on the schema this operation produces (response 2xx schema), the schema it consumes (parameter of type body), or the tags properties of the operation. When no class is a good fit for the operation, an artificial class is created to host the operation. The name of such class is inferred from the path of the operation.
  • The name of an operation is taken from operationId of the operation definition. If such information is not provided the name is created by concatenating the method of the operation (e.g., get, post) plus the name of its class.
  • The cardinalities of attributes and parameters are inferred from:
    • the type field (array for multivalued)
    • the required field in the OpenAPI definition (note that a required parameter or property of type array doesn't not mean that the lower bound should be 1. Empty arrays are still valid).
    • minItems and maxItems for array types.

N.B. This tool relies on the OpenAPI metamodel and the OpenAPI UML profile.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].