Change generator type to kotlin spring

This commit is contained in:
kashiuno 2025-01-03 18:12:08 +03:00
parent 91ef88d8c9
commit 95f866cd78

View File

@ -13,9 +13,17 @@ repositories {
mavenCentral()
}
// TODO: Нужно присобачить bom
dependencies {
compileOnly("com.squareup.okhttp3:okhttp:4.12.0")
compileOnly("com.squareup.moshi:moshi-kotlin:1.15.2")
compileOnly("org.springframework.boot:spring-boot-autoconfigure:3.4.1")
compileOnly("org.springframework.boot:spring-boot-starter-web:3.4.1")
compileOnly("org.springframework.boot:spring-boot-starter-validation:3.4.1")
compileOnly("jakarta.servlet:jakarta.servlet-api:6.1.0")
compileOnly("io.swagger.core.v3:swagger-annotations:2.2.27")
compileOnly("io.swagger.core.v3:swagger-models:2.2.27")
testImplementation(kotlin("test"))
}
@ -28,10 +36,14 @@ kotlin {
}
tasks.openApiGenerate {
generatorName.set("kotlin")
generatorName.set("kotlin-spring")
inputSpec.set("$rootDir/src/main/resources/openapi-contract.yaml")
outputDir.set(generatedSourcesDir)
packageName.set("ru.vyatsu")
configOptions.put("interfaceOnly", "true")
configOptions.put("useSpringBoot3", "true")
configOptions.put("useBeanValidation", "false")
configOptions.put("useSwaggerUI", "false")
}
sourceSets {