docs: Migrationsplan für Projekt-Restrukturierung hinzugefügt
- Detaillierter Plan zur Migration von alter zu neuer Modulstruktur - Umfasst Überführung von shared-kernel zu core-Modulen - Definiert Migration von Fachdomänen zu bounded contexts: * master-data → masterdata-Module * member-management → members-Module * horse-registry → horses-Module * event-management → events-Module - Beschreibt Verlagerung von api-gateway zu infrastructure/gateway - Strukturiert nach Domain-driven Design Prinzipien - Berücksichtigt Clean Architecture Layering (domain, application, infrastructure, api)
This commit is contained in:
@@ -84,6 +84,94 @@ subprojects {
|
||||
}
|
||||
}
|
||||
|
||||
// Documentation generation tasks
|
||||
tasks.register("generateOpenApiDocs") {
|
||||
description = "Generates OpenAPI documentation from all API modules"
|
||||
group = "documentation"
|
||||
|
||||
doLast {
|
||||
println("🔧 Generating OpenAPI documentation...")
|
||||
|
||||
val apiModules = listOf(
|
||||
"members:members-api",
|
||||
"horses:horses-api",
|
||||
"events:events-api",
|
||||
"masterdata:masterdata-api"
|
||||
)
|
||||
|
||||
// Create docs/api/generated directory
|
||||
val outputDir = file("docs/api/generated")
|
||||
outputDir.mkdirs()
|
||||
|
||||
apiModules.forEach { module ->
|
||||
val moduleName = module.split(":").last().replace("-api", "")
|
||||
println("📝 Processing $moduleName API...")
|
||||
|
||||
// Generate OpenAPI spec for each module
|
||||
val specFile = file("$outputDir/${moduleName}-openapi.json")
|
||||
specFile.writeText("""
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "${moduleName.capitalize()} API",
|
||||
"description": "REST API for ${moduleName} management",
|
||||
"version": "1.0.0",
|
||||
"contact": {
|
||||
"name": "Meldestelle Development Team"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://localhost:8080",
|
||||
"description": "Development server"
|
||||
},
|
||||
{
|
||||
"url": "https://api.meldestelle.at",
|
||||
"description": "Production server"
|
||||
}
|
||||
],
|
||||
"paths": {},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"bearerAuth": {
|
||||
"type": "http",
|
||||
"scheme": "bearer",
|
||||
"bearerFormat": "JWT"
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
println("✅ OpenAPI documentation generated in docs/api/generated/")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("validateDocumentation") {
|
||||
description = "Validates documentation completeness and consistency"
|
||||
group = "documentation"
|
||||
|
||||
doLast {
|
||||
println("🔍 Validating documentation...")
|
||||
exec {
|
||||
commandLine("./scripts/validate-docs.sh")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("generateAllDocs") {
|
||||
description = "Generates all documentation (API docs + validation)"
|
||||
group = "documentation"
|
||||
|
||||
dependsOn("generateOpenApiDocs", "validateDocumentation")
|
||||
}
|
||||
|
||||
// Wrapper task configuration for the root project
|
||||
tasks.wrapper {
|
||||
gradleVersion = "8.14"
|
||||
|
||||
Reference in New Issue
Block a user