src/main/java/com/example/mde
├── controller
│ ├── ProjectController.java
│ └── TerraformController.java
├── model
│ ├── initConfig
│ ├── gitlab
│ └── terraform
├── service
│ ├── ProjectService.java
│ └── TerraformService.java
└── util
├── JsonToModel.java
├── InitConfigToGitlabTransformer.java
├── GitlabToYaml.java
├── JsonToTerraform.java
└── TerraformGenerator.java
The following JAR libraries are included in the project classpath:
The ProjectController receives HTTP requests from the client (frontend) via the URI /api/project.
POST /upload:
- Receives form data containing a MultipartFile (the .json initiConfig input)
- Stores the input file in
uploads/project.json - Calls executeTransformation(jsonPath) in the Service layer and receives Yaml path
- If the Yaml file exists in that path, attaches it to the response to the client
Serves as an intermediary to the Util script files that interact with the models.
- Executes JsonToModel.java
- Executes InitConfigToGitLabTransformer.java
- Executes GitlabToYaml.java
- Returns the path to the generated gitlab yaml file
Contains the mentioned script files.
Contains the generated model files as Java classes.