PMT-9: Anlegen des Employee Services #5

Merged
SZUT-Dominik merged 8 commits from task/PMT-9-anlegen-des-employ-service into trunk 2024-09-30 12:37:00 +00:00
5 changed files with 27 additions and 6 deletions
Showing only changes of commit 558cd46a7c - Show all commits

View file

@ -23,7 +23,7 @@ checkstyle {
} }
spotbugs { spotbugs {
toolVersion = "4.8.6" toolVersion = "4.8.6"
effort.set(Effort.MAX) effort.set(Effort.MAX)
reportLevel.set(Confidence.LOW) reportLevel.set(Confidence.LOW)
} }
@ -75,20 +75,27 @@ dependencies {
swaggerSources { swaggerSources {
register("pmt") { register("pmt") {
setInputFile(file("${rootDir}/src/main/resources/api.yml")) setInputFile(file("${rootDir}/api/pmt.yml"))
code.configFile = file("${rootDir}/src/main/resources/gen-config.json") code.configFile = file("${rootDir}/gen/config-pmt.json")
val validationTask = validation val validationTask = validation
code(delegateClosureOf<GenerateSwaggerCode> { code(delegateClosureOf<GenerateSwaggerCode> {
language = "spring" language = "spring"
code.rawOptions = code.rawOptions =
listOf("--ignore-file-override=" + file("${rootDir}/src/main/resources/.codegen-ignore").absolutePath) listOf("--ignore-file-override=" + file("${rootDir}/gen/.ignore-pmt").absolutePath)
dependsOn(validationTask) dependsOn(validationTask)
}) })
} }
create("employee") {
setInputFile(file("${rootDir}/api/employee.yml"))
code.configFile = file("${rootDir}/gen/config-employee.json")
code(delegateClosureOf<GenerateSwaggerCode> {
language = "java"
})
}
} }
tasks { tasks {
withType()
withType<Checkstyle> { withType<Checkstyle> {
reports { reports {
xml.required.set(true) xml.required.set(true)
@ -96,7 +103,6 @@ tasks {
} }
} }
withType<SpotBugsTask> { withType<SpotBugsTask> {
excludeFilter.set(file("${rootDir}/src/main/resources/spotbugs-exclude.xml")) excludeFilter.set(file("${rootDir}/src/main/resources/spotbugs-exclude.xml"))
} }
processResources { processResources {
@ -107,6 +113,7 @@ tasks {
} }
named("compileJava").configure { named("compileJava").configure {
dependsOn(swaggerSources.getByName("pmt").code) dependsOn(swaggerSources.getByName("pmt").code)
dependsOn(swaggerSources.getByName("employee").code)
} }
} }
@ -114,5 +121,8 @@ sourceSets {
main { main {
java.srcDir("${swaggerSources.getByName("pmt").code.outputDir}/src/main/java") java.srcDir("${swaggerSources.getByName("pmt").code.outputDir}/src/main/java")
resources.srcDir("${swaggerSources.getByName("pmt").code.outputDir}/src/main/resources") resources.srcDir("${swaggerSources.getByName("pmt").code.outputDir}/src/main/resources")
java.srcDir("${swaggerSources.getByName("employee").code.outputDir}/src/main/java")
resources.srcDir("${swaggerSources.getByName("employee").code.outputDir}/src/main/resources")
} }
} }

11
gen/config-employee.json Normal file
View file

@ -0,0 +1,11 @@
{
"modelPackage": "de.hmmh.pmt.employee.dtos",
"apiPackage": "de.hmmh.pmt.employee.api",
"invokerPackage": "de.hmmh.pmt.employee",
"java8": false,
"java11": true,
"dateLibrary": "java11",
"library": "resttemplate",
"serializableModel": true,
"jakarta": true
}