SOM-Research / jsonSchema-to-uml

A tool to generate UML class diagrams from JSON schema documents
https://som-research.uoc.edu/research-tools/
Eclipse Public License 2.0
39 stars 4 forks source link
eclipse json json-schema json-schema-documents uml uml-class-diagram

jsonSchema-to-uml

A tool to generate UML models from JSON schema documents.

Requirements

To generate UML models:

To visualize the generated UML models:

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://som-research.github.io/jsonSchema-to-uml/update/
  4. Select JSONSchema to UML then click on Next.
  5. Follow the the rest of the steps (license, etc...) and reboot Eclipse.

Using the plugin

  1. Create a Project or use an existing project in your workspace.
  2. Import the JSON Schema documents in your Eclipse project.
  3. To generate a UML model from your documents you can right-click on a JSON file of your project or a folder containing your documents, and select the JSONSchema to UML/Generate Class diagram option.
  4. A UML model corresponding to the input definition will be generated in the folder src-gen of your project.

Visualizing the Class diagram using Papyrus

  1. Install Papyrus if you didn't do it yet (You can find the instructions here).
  2. Open the perspective Papyrus.
  3. Right-click on the generated UML model and select New -> Papyrus Model.
  4. 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).
  5. Drag-and-drop the UML elements from the Model Explrer into the editor.
  6. Align and arrange the layout as you prefer.
  7. Save.

The mapping in a nutshell

The generation process apply this (non exhaustive) list of mappings: