Version: | 0.1.0 |
---|---|
Source: | https://github.com/maykinmedia/imvertor-lite |
Keywords: | gegevensmodel, json-schema, eap |
PythonVersion: | 3.7 |
Convert an UML class to a JSON schema.
Developed by Maykin Media B.V..
Create a JSON schema based on an Enterprise Architect UML class. Typically used for converting a class in the Gemeentelijk Gegevensmodel created by the municipality of Delft.
The name "Imvertor Lite" refers to the Imvertor project as a joke since it was initially considered to be a really bad idea while now creating a similar tool. This tool is in no way affiliated with Imvertor.
$ git clone [email protected]:maykinmedia/imvertor-lite.git
$ cd imvertor-lite
$ python3 -m venv env
$ source env/bin/activate
$ pip install -r requirements
Get an export of a file provided by a municipality. For example, as provided by the municipality of Delft in their Gemeentelijk Gegevensmodel using Enterprise Architect:
$ wget -O ggm_original.xml https://github.com/Gemeente-Delft/Gemeentelijk-Gegevensmodel/raw/master/gemeentelijk%20gegevensmodel.xml $ iconv -f utf-8 -t ascii -c ggm_original.xml -o ggm.xml
Run the converter on the downloaded XML file and target a specific class by its name:
$ python imvertorlite.py -f ggm.xml -n Boom -p enteprise_architect
(Optionally) Generate a README file using your preferred template.
$ python imvertorlite.py -f ggm.xml -n Boom -p enteprise_architect -t templates/README-ea.md.template
The result is in a file named after the class name, in this case
boom.json
.
Copyright © Maykin Media B.V., 2020