Skip to content

Commit c1c7ab9

Browse files
committed
Merge branch 'master' into feature/add-support-for-includeHttpRequestContext-to-java-spring-codegen
2 parents fef4ef0 + 38f0796 commit c1c7ab9

450 files changed

Lines changed: 5981 additions & 597 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/samples-kotlin-echo-api.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- samples/client/echo_api/kotlin-jvm-spring-3-restclient
2121
- samples/client/echo_api/kotlin-model-prefix-type-mappings
2222
- samples/client/echo_api/kotlin-jvm-okhttp
23+
- samples/client/echo_api/kotlin-jvm-okhttp-multipart-json
2324
steps:
2425
- uses: actions/checkout@v5
2526
- uses: actions/setup-java@v5

.github/workflows/samples-kotlin-server-jdk17.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Samples Kotlin server (jdk17)
33
on:
44
push:
55
paths:
6+
- 'samples/server/others/kotlin-server/**'
67
- 'samples/server/petstore/kotlin-springboot-3*/**'
78
- 'samples/server/petstore/kotlin-server/**'
89
- 'samples/server/petstore/kotlin-server-modelMutable/**'
@@ -13,6 +14,7 @@ on:
1314
# - samples/server/petstore/kotlin-spring-default/**
1415
pull_request:
1516
paths:
17+
- 'samples/server/others/kotlin-server/**'
1618
- 'samples/server/petstore/kotlin-springboot-3*/**'
1719
- 'samples/server/petstore/kotlin-server/**'
1820
- 'samples/server/petstore/kotlin-server-modelMutable/**'
@@ -34,6 +36,10 @@ jobs:
3436
matrix:
3537
sample:
3638
# server
39+
- samples/server/others/kotlin-server/polymorphism-allof-and-discriminator
40+
- samples/server/others/kotlin-server/polymorphism-and-discriminator-disabled-jackson-fix
41+
- samples/server/others/kotlin-server/polymorphism-and-discriminator
42+
- samples/server/others/kotlin-server/polymorphism
3743
- samples/server/petstore/kotlin-server-required-and-nullable-properties
3844
- samples/server/petstore/kotlin-springboot-3
3945
- samples/server/petstore/kotlin-springboot-3-no-response-entity

.github/workflows/samples-kotlin-server-jdk21.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ name: Samples Kotlin server (jdk21)
33
on:
44
push:
55
paths:
6+
- 'samples/server/others/kotlin-server/**'
67
- 'samples/server/petstore/kotlin-server/**'
78
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
89
pull_request:
910
paths:
11+
- 'samples/server/others/kotlin-server/**'
1012
- 'samples/server/petstore/kotlin-server/**'
1113
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
1214

@@ -21,6 +23,10 @@ jobs:
2123
fail-fast: false
2224
matrix:
2325
sample:
26+
- samples/server/others/kotlin-server/polymorphism-allof-and-discriminator
27+
- samples/server/others/kotlin-server/polymorphism-and-discriminator-disabled-jackson-fix
28+
- samples/server/others/kotlin-server/polymorphism-and-discriminator
29+
- samples/server/others/kotlin-server/polymorphism
2430
- samples/server/petstore/kotlin-server/javalin-6
2531
- samples/server/petstore/kotlin-server/ktor
2632
- samples/server/petstore/kotlin-server/ktor2

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ samples/client/petstore/kotlin*/src/main/kotlin/test/
229229
samples/client/petstore/kotlin*/build/
230230
samples/server/others/kotlin-server/jaxrs-spec/build/
231231
samples/client/echo_api/kotlin-jvm-spring-3-restclient/build/
232+
samples/client/echo_api/kotlin-jvm-spring-3-webclient/build/
232233
samples/client/echo_api/kotlin-jvm-okhttp/build/
234+
samples/client/echo_api/kotlin-jvm-okhttp-multipart-json/build/
233235

234236
# haskell
235237
.stack-work
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
generatorName: kotlin-server
2+
outputDir: samples/server/others/kotlin-server/polymorphism-allof-and-discriminator
3+
inputSpec: modules/openapi-generator/src/test/resources/3_1/polymorphism-allof-and-discriminator.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/kotlin-server
5+
additionalProperties:
6+
artifactId: kotlin-server-polymorphism-allof-and-discriminator
7+
library: javalin6
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
generatorName: kotlin-server
2+
outputDir: samples/server/others/kotlin-server/polymorphism-and-discriminator-disabled-jackson-fix
3+
inputSpec: modules/openapi-generator/src/test/resources/3_1/polymorphism-and-discriminator.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/kotlin-server
5+
additionalProperties:
6+
artifactId: kotlin-server-polymorphism-and-discriminator-disabled-jackson-fix
7+
library: javalin6
8+
# This is set to "true" by default, but we also want to test the case where it's set to false.
9+
# See KotlinServerCodegen.java for more details about this property.
10+
fixJacksonJsonTypeInfoInheritance: false
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
generatorName: kotlin-server
2+
outputDir: samples/server/others/kotlin-server/polymorphism-and-discriminator
3+
inputSpec: modules/openapi-generator/src/test/resources/3_1/polymorphism-and-discriminator.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/kotlin-server
5+
additionalProperties:
6+
artifactId: kotlin-server-polymorphism-and-discriminator
7+
library: javalin6
8+
fixJacksonJsonTypeInfoInheritance: true
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
generatorName: kotlin-server
2+
outputDir: samples/server/others/kotlin-server/polymorphism
3+
inputSpec: modules/openapi-generator/src/test/resources/3_1/polymorphism.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/kotlin-server
5+
additionalProperties:
6+
artifactId: kotlin-server-polymorphism
7+
library: javalin6

docs/generators/kotlin-server.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
3030
|featureHSTS|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |true|
3131
|featureMetrics|Enables metrics feature.| |true|
3232
|featureResources|Generates routes in a typed way, for both: constructing URLs and reading the parameters.| |true|
33+
|fixJacksonJsonTypeInfoInheritance|When true (default), ensures Jackson polymorphism works correctly by: (1) always setting visible=true on @JsonTypeInfo, and (2) adding the discriminator property to child models with appropriate default values. When false, visible is only set to true if all children already define the discriminator property.| |true|
3334
|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools|
3435
|interfaceOnly|Whether to generate only API interface stubs without the server files. This option is currently supported only when using jaxrs-spec library.| |false|
3536
|library|library template (sub-template)|<dl><dt>**ktor**</dt><dd>ktor framework</dd><dt>**ktor2**</dt><dd>ktor (2.x) framework</dd><dt>**jaxrs-spec**</dt><dd>JAX-RS spec only</dd><dt>**javalin5**</dt><dd>Javalin 5</dd><dt>**javalin6**</dt><dd>Javalin 6</dd></dl>|ktor|
@@ -262,11 +263,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
262263
| ---- | --------- | ---------- |
263264
|Simple|✓|OAS2,OAS3
264265
|Composite|✓|OAS2,OAS3
265-
|Polymorphism||OAS2,OAS3
266+
|Polymorphism||OAS2,OAS3
266267
|Union|✗|OAS3
267-
|allOf||OAS2,OAS3
268+
|allOf||OAS2,OAS3
268269
|anyOf|✗|OAS3
269-
|oneOf||OAS3
270+
|oneOf||OAS3
270271
|not|✗|OAS3
271272

272273
### Security Feature

docs/generators/typescript.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
4242
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
4343
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
4444
|supportsES6|Generate code that conforms to ES6.| |false|
45+
|typescriptMajorVersion|Specify the major version of TypeScript to use in the client code. Default is 5.| |5|
4546
|useErasableSyntax|Use erasable syntax for the generated code. This is a temporary feature and will be removed in the future.| |false|
4647
|useInversify|Enable this to generate decorators and service identifiers for the InversifyJS inversion of control container. If you set 'deno' as 'platform', the generator will process this value as 'disable'.| |false|
4748
|useObjectParameters|Use aggregate parameter objects as function arguments for api operations instead of passing each parameter as a separate function argument.| |false|

0 commit comments

Comments
 (0)