Change generator type to kotlin spring
This commit is contained in:
parent
91ef88d8c9
commit
95f866cd78
@ -13,9 +13,17 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Нужно присобачить bom
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("com.squareup.okhttp3:okhttp:4.12.0")
|
compileOnly("com.squareup.okhttp3:okhttp:4.12.0")
|
||||||
compileOnly("com.squareup.moshi:moshi-kotlin:1.15.2")
|
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"))
|
testImplementation(kotlin("test"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,10 +36,14 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.openApiGenerate {
|
tasks.openApiGenerate {
|
||||||
generatorName.set("kotlin")
|
generatorName.set("kotlin-spring")
|
||||||
inputSpec.set("$rootDir/src/main/resources/openapi-contract.yaml")
|
inputSpec.set("$rootDir/src/main/resources/openapi-contract.yaml")
|
||||||
outputDir.set(generatedSourcesDir)
|
outputDir.set(generatedSourcesDir)
|
||||||
packageName.set("ru.vyatsu")
|
packageName.set("ru.vyatsu")
|
||||||
|
configOptions.put("interfaceOnly", "true")
|
||||||
|
configOptions.put("useSpringBoot3", "true")
|
||||||
|
configOptions.put("useBeanValidation", "false")
|
||||||
|
configOptions.put("useSwaggerUI", "false")
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
Loading…
Reference in New Issue
Block a user