Skip to content

Commit 4b7e241

Browse files
committed
Fix tests after conflicts resolved
1 parent 66ead6a commit 4b7e241

7 files changed

Lines changed: 12 additions & 10 deletions

File tree

docs/generators/kotlin-server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2222
|apiSuffix|suffix for api classes| |Api|
2323
|artifactId|Generated artifact id (name of jar).| |kotlin-server|
2424
|artifactVersion|Generated artifact's package version.| |1.0.0|
25+
|delegatePattern|Whether to generate the server files using the delegate pattern. This option is currently supported only when using ktor library.| |true|
2526
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', 'original', and 'bestEffortBacktick' (like 'original' but tries to wrap values in backticks before falling back to sanitizing, e.g. `name,asc` stays `name,asc` rather than becoming nameCommaAsc; useful for sort/order enums)| |original|
2627
|featureAutoHead|Automatically provide responses to HEAD requests for existing routes that have the GET verb defined.| |true|
2728
|featureCORS|Ktor by default provides an interceptor for implementing proper support for Cross-Origin Resource Sharing (CORS). See enable-cors.org.| |false|

modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinServerCodegenTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.RETURN_RESPONSE;
4141
import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.USE_TAGS;
4242
import static org.openapitools.codegen.languages.features.BeanValidationFeatures.USE_BEANVALIDATION;
43+
import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.DELEGATE_PATTERN;
44+
import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.KTOR;
4345

4446
public class KotlinServerCodegenTest {
4547

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.21.0-SNAPSHOT
1+
7.23.0-SNAPSHOT

samples/server/petstore/kotlin-server/ktor-delegate-pattern/generated/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
44

5-
Generated by OpenAPI Generator 7.21.0-SNAPSHOT.
5+
Generated by OpenAPI Generator 7.23.0-SNAPSHOT.
66

77
## Requires
88

samples/server/petstore/kotlin-server/ktor-delegate-pattern/generated/build.gradle.kts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ group = "org.openapitools"
66
version = "1.0.0"
77

88
plugins {
9-
kotlin("jvm") version "2.0.20"
10-
application
11-
kotlin("plugin.serialization") version "2.0.20"
9+
kotlin("jvm") version "2.3.0"
10+
id("io.ktor.plugin") version "3.4.0"
11+
kotlin("plugin.serialization") version "2.3.0"
1212
}
1313

1414
application {
15-
mainClass.set("io.ktor.server.netty.EngineMain")
15+
mainClass = "io.ktor.server.netty.EngineMain"
1616

1717
val isDevelopment: Boolean = project.ext.has("development")
1818
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
@@ -23,7 +23,6 @@ repositories {
2323
}
2424

2525
dependencies {
26-
implementation(platform("io.ktor:ktor-bom:3.0.2"))
2726
implementation("ch.qos.logback:logback-classic:$logback_version")
2827
implementation("com.typesafe:config:1.4.1")
2928
implementation("io.ktor:ktor-server-auth")
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
kotlin.code.style=official
2-
ktor_version=3.0.2
3-
kotlin_version=2.0.20
2+
ktor_version=3.4.0
3+
kotlin_version=2.3.0
44
logback_version=1.5.19

samples/server/petstore/kotlin-server/ktor-delegate-pattern/generated/src/main/resources/logback.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<configuration>
22
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
33
<encoder>
4-
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
4+
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
55
</encoder>
66
</appender>
77

0 commit comments

Comments
 (0)