A Spring Boot REST API service for validating and standardizing GenModel files for MWE2 workflow compatibility.
- GenModel Validation: Inspect GenModel files for compliance issues
- GenModel Processing: Automatically apply standardization rules to GenModel files
- REST API: Clean and intuitive RESTful endpoints
- Error Handling: Comprehensive error reporting and validation
- Docker Support: Ready-to-use Docker setup
- Java 21+
- Maven 3.8+
- Docker (optional)
mvn clean packagejava -jar target/methodologist-setup-service-0.0.1-SNAPSHOT.jarThe service will start on http://localhost:8090
docker compose up --buildPOST /api/genmodel/inspect
Analyzes a GenModel file and previews what changes would be applied.
curl -X POST -F "file=@mymodel.genmodel" http://localhost:8090/api/genmodel/inspectResponse:
{
"status": "success",
"message": "GenModel inspected successfully, showing planned changes",
"issues": [
{
"filename": "mymodel.genmodel",
"message": "Would remove attributes: complianceLevel"
}
]
}POST /api/genmodel/process
Analyzes a GenModel file and applies the standardization changes.
curl -X POST -F "file=@mymodel.genmodel" http://localhost:8090/api/genmodel/processResponse:
{
"status": "success",
"message": "GenModel processed and changes applied successfully",
"issues": [
{
"filename": "mymodel.genmodel",
"message": "Removed attributes: complianceLevel"
}
]
}The service automatically applies these normalization rules:
-
Removes deprecated attributes:
complianceLevel,compliance,editDirectory,editorDirectory, etc.
-
Ensures correct basePackage:
- Sets basePackage to match modelPluginID for all GenPackages
-
Standardizes modelDirectory:
- Format:
/{modelPluginID}/target/generated-sources/ecore
- Format:
-
Enforces creationIcons:
- Sets to
false
- Sets to
-
Ensures foreignModel reference:
- Adds missing foreignModel entry automatically
src/main/java/tools/vitruv/methodologist/setup/
├── api/
│ ├── controller/ # REST controllers
│ └── dto/ # Data Transfer Objects
├── service/ # Business logic layer
└── MethodologistSetupServiceApplication.java
curl http://localhost:8090/actuator/healthSee src/main/resources/application.properties for available configurations.
Default settings:
- Port:
8090 - Application Name:
methodologist-setup-service
- Framework: Spring Boot 4.0.6
- Modeling: Eclipse EMF (EMF Ecore, EMF GenModel, EMF Codegen)
- XML Processing: StAX (Streaming API for XML)
- Build Tool: Maven 3.8+
- Java Version: 21 LTS
For detailed API documentation, see API_DOCUMENTATION.md
All requests return appropriate HTTP status codes:
200 OK: Successful operation400 Bad Request: Invalid input or processing error500 Internal Server Error: Unexpected server error
Error responses include detailed messages to help with debugging.