Skip to content

Commit 8441eb0

Browse files
committed
Merge remote-tracking branch 'origin/master' into fix-additional-props
2 parents 61a5d27 + 6e0fe09 commit 8441eb0

273 files changed

Lines changed: 8679 additions & 864 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-client.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
- samples/client/others/kotlin-jvm-okhttp-path-comments
7373
- samples/client/others/kotlin-integer-enum
7474
- samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization
75+
- samples/client/others/kotlin-oneOf-discriminator-kotlinx-serialization
7576
steps:
7677
- uses: actions/checkout@v5
7778
- uses: actions/setup-java@v5

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
- samples/server/petstore/kotlin-springboot-source-swagger2
4040
- samples/server/petstore/kotlin-springboot-springfox
4141
- samples/server/petstore/kotlin-springboot-x-kotlin-implements
42+
- samples/server/petstore/kotlin-springboot-include-http-request-context-delegate
4243
- samples/server/petstore/kotlin-server/ktor
4344
- samples/server/petstore/kotlin-server/ktor2
4445
- samples/server/petstore/kotlin-server/jaxrs-spec
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
generatorName: kotlin
2+
outputDir: samples/client/others/kotlin-oneOf-discriminator-kotlinx-serialization
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/polymorphism-oneof-discriminator.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/kotlin-client
5+
additionalProperties:
6+
artifactId: kotlin-oneOf-discriminator
7+
serializableModel: "false"
8+
dateLibrary: java8
9+
library: jvm-retrofit2
10+
enumUnknownDefaultCase: true
11+
serializationLibrary: kotlinx_serialization
12+
generateOneOfAnyOfWrappers: true
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
generatorName: kotlin-spring
2+
outputDir: samples/server/petstore/kotlin-springboot-include-http-request-context-delegate
3+
library: spring-boot
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/petstore-with-x-kotlin-implements.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
6+
additionalProperties:
7+
documentationProvider: none
8+
annotationLibrary: swagger1
9+
useSwaggerUI: false
10+
serviceImplementation: false
11+
skipDefaultInterface: true
12+
interfaceOnly: false
13+
serializableModel: true
14+
beanValidations: true
15+
includeHttpRequestContext: true
16+
reactive: true
17+
delegatePattern: true

bin/configs/kotlin-spring-boot-x-kotlin-implements.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/petstore-with
55
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
66
additionalProperties:
77
documentationProvider: none
8-
annotationLibrary: none
9-
useSwaggerUI: "false"
10-
serviceImplementation: "false"
11-
skipDefaultInterface: "true"
12-
interfaceOnly: "true"
13-
serializableModel: "true"
14-
beanValidations: "true"
8+
annotationLibrary: swagger1
9+
useSwaggerUI: false
10+
serviceImplementation: false
11+
skipDefaultInterface: true
12+
interfaceOnly: true
13+
serializableModel: true
14+
beanValidations: true
15+
includeHttpRequestContext: true

docs/generators/java-microprofile.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
105105
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
106106
|useSealedOneOfInterfaces|Generate the oneOf interfaces as sealed interfaces. Only supported for WebClient and RestClient.| |false|
107107
|useSingleRequestParameter|Setting this property to "true" will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY native, jersey2, jersey3, okhttp-gson, microprofile, Spring RestClient, Spring WebClient support this option. Setting this property to "static" does the same as "true", but also makes the generated arguments class static with single parameter instantiation.| |false|
108+
|useUnaryInterceptor|If true it will generate ResponseInterceptors using a UnaryOperator. This can be usefull for manipulating the request before it gets passed, for example doing your own decryption| |false|
108109
|webclientBlockingOperations|Making all WebClient operations blocking(sync). Note that if on operation 'x-webclient-blocking: false' then such operation won't be sync| |false|
109110
|withAWSV4Signature|whether to include AWS v4 signature support (only available for okhttp-gson library)| |false|
110111
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|

docs/generators/java.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
105105
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
106106
|useSealedOneOfInterfaces|Generate the oneOf interfaces as sealed interfaces. Only supported for WebClient and RestClient.| |false|
107107
|useSingleRequestParameter|Setting this property to "true" will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY native, jersey2, jersey3, okhttp-gson, microprofile, Spring RestClient, Spring WebClient support this option. Setting this property to "static" does the same as "true", but also makes the generated arguments class static with single parameter instantiation.| |false|
108+
|useUnaryInterceptor|If true it will generate ResponseInterceptors using a UnaryOperator. This can be usefull for manipulating the request before it gets passed, for example doing your own decryption| |false|
108109
|webclientBlockingOperations|Making all WebClient operations blocking(sync). Note that if on operation 'x-webclient-blocking: false' then such operation won't be sync| |false|
109110
|withAWSV4Signature|whether to include AWS v4 signature support (only available for okhttp-gson library)| |false|
110111
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|

docs/generators/kotlin-spring.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
3535
|exceptionHandler|generate default global exception handlers (not compatible with reactive. enabling reactive will disable exceptionHandler )| |true|
3636
|gradleBuildFile|generate a gradle build file using the Kotlin DSL| |true|
3737
|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools|
38+
|includeHttpRequestContext|Whether to include HttpServletRequest (blocking) or ServerWebExchange (reactive) as additional parameter in generated methods.| |false|
3839
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
3940
|library|library template (sub-template)|<dl><dt>**spring-boot**</dt><dd>Spring-boot Server application.</dd><dt>**spring-cloud**</dt><dd>Spring-Cloud-Feign client with Spring-Boot auto-configured settings.</dd><dt>**spring-declarative-http-interface**</dt><dd>Spring Declarative Interface client</dd></dl>|spring-boot|
4041
|modelMutable|Create mutable models| |false|

docs/generators/nim.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
226226
|Polymorphism|✗|OAS2,OAS3
227227
|Union|✗|OAS3
228228
|allOf|✗|OAS2,OAS3
229-
|anyOf||OAS3
230-
|oneOf||OAS3
229+
|anyOf||OAS3
230+
|oneOf||OAS3
231231
|not|✗|OAS3
232232

233233
### Security Feature

modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,6 +1843,7 @@ public DefaultCodegen() {
18431843
protected void initializeSpecialCharacterMapping() {
18441844
// Initialize special characters
18451845
specialCharReplacements.put("$", "Dollar");
1846+
specialCharReplacements.put("€", "Euro");
18461847
specialCharReplacements.put("^", "Caret");
18471848
specialCharReplacements.put("|", "Pipe");
18481849
specialCharReplacements.put("=", "Equal");

0 commit comments

Comments
 (0)