Generate sourcecode from a unified JSON specification into different languages. The language templates are defined in twig. This project originates from a non-public development tool. It is not ready for public production use yet.
- Install composer and symfony cli
- clone repository
- composer install
- symfony server:start
The easiest way to run this project is to create source from the example JSON definition. Use the "example_input.json" from the main dir and send it with a POST request to following url:
https://localhost:8000/codegen/model/java
Now you get a java source as response.
It works the same way if you want a PHP source:
https://localhost:8000/codegen/model/php
(Please note that the url has changed)
The "model" in the url specifies the name of the template to use. You can create your own templates with twig. After you put them in the folder /templates/codegen you can call them. Please note that you have to create new macros for new languages. In particular, in lang.xxx.twig the language is described.