jupe / puml2code

PlantUML code generator
MIT License
100 stars 19 forks source link

create json schema from UML class diagrams #120

Open frank-mahler opened 9 months ago

frank-mahler commented 9 months ago

Description

Use puml2code to generate json-schema files from UML diagrams respecting inheritance (and since inheritance is unsupported in json schema, copy inherited attributes)

Suggested enhancement Currently it seems no CASE tool exists to create json schema from a graphical representation. In our project we currently design json schema files as a basis for a data model used to ingest data via json-line files, store the data in a graph database and offer APIs that present data via REST thus exporting the very same json structure.

The data model needs inheritance to be consistent and easier to read. We'd like to use UML to explain our data model. And we need a tool to create json schemata.

Pros There will be a single source of truth of our data model, described by PlantUML and further development will rely on the created json schemata by puml2code.

Cons Description of a complex data model in PlantUML might be hard to maintain. Introducing inheritance by copying inherited attributes might be a dirty hack (but if you read between the lines in stackoverflow I'm not the only one who might like that anyway 😄)


Question

How to? I'd like to contribute to that idea if possible. Is there some advice how to start writing a puml2code for json schema extension? Or any idea how to do better?