Skip to content

Commit 931cfb5

Browse files
committed
Merge branch 'master' into bugfix/22859-Spring-HTTP-Interface-library-must-support-useBeanValidation
2 parents 9ffe338 + aaa3500 commit 931cfb5

22 files changed

Lines changed: 39 additions & 23 deletions

File tree

docs/generators/java-camel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
111111
|useOptional|Use Optional container for optional parameters| |false|
112112
|useResponseEntity|Use the `ResponseEntity` type to wrap return values of generated API methods. If disabled, method are annotated using a `@ResponseStatus` annotation, which has the status of the first response declared in the Api definition| |true|
113113
|useSealed|Whether to generate sealed model interfaces and classes| |false|
114-
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
114+
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot ≥ 3 (use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
115115
|useSpringBuiltInValidation|Disable `@Validated` at the class level when using built-in validation.| |false|
116116
|useSpringController|Annotate the generated API as a Spring Controller| |false|
117117
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|

docs/generators/kotlin-spring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5656
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
5757
|useFlowForArrayReturnType|Whether to use Flow for array/collection return types when reactive is enabled. If false, will use List instead.| |true|
5858
|useResponseEntity|Whether (when false) to return actual type (e.g. List<Fruit>) and handle non-happy path responses via exceptions flow or (when true) return entire ResponseEntity (e.g. ResponseEntity<List<Fruit>>). If disabled, method are annotated using a @ResponseStatus annotation, which has the status of the first response declared in the Api definition| |true|
59-
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
59+
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot ≥ 3 (use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
6060
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
6161
|useTags|Whether to use tags for creating interface and controller class names| |false|
6262

docs/generators/spring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
104104
|useOptional|Use Optional container for optional parameters| |false|
105105
|useResponseEntity|Use the `ResponseEntity` type to wrap return values of generated API methods. If disabled, method are annotated using a `@ResponseStatus` annotation, which has the status of the first response declared in the Api definition| |true|
106106
|useSealed|Whether to generate sealed model interfaces and classes| |false|
107-
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
107+
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot ≥ 3 (use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
108108
|useSpringBuiltInValidation|Disable `@Validated` at the class level when using built-in validation.| |false|
109109
|useSpringController|Annotate the generated API as a Spring Controller| |false|
110110
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|

docs/plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ This gives access to the following tasks:
162162

163163
| Task | Description |
164164
|---------------------------|---------------------------------------------------------------------------------------------|
165-
| <configName>.generate | Generate code via Open API Tools Generator for Open API 2.0 or 3.x specification documents. |
166-
| <configName>.validateSpec | Validates the configured spec |
165+
| &lt;configName&gt;.generate | Generate code via Open API Tools Generator for Open API 2.0 or 3.x specification documents. |
166+
| &lt;configName&gt;.validateSpec | Validates the configured spec |
167167

168168
and a command
169169

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public KotlinSpringServerCodegen() {
241241
addSwitch(BEAN_QUALIFIERS, "Whether to add fully-qualifier class names as bean qualifiers in @Component and " +
242242
"@RestController annotations. May be used to prevent bean names clash if multiple generated libraries" +
243243
" (contexts) added to single project.", beanQualifiers);
244-
addSwitch(USE_SPRING_BOOT3, "Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.", useSpringBoot3);
244+
addSwitch(USE_SPRING_BOOT3, "Generate code and provide dependencies for use with Spring Boot ≥ 3 (use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.", useSpringBoot3);
245245
addSwitch(USE_FLOW_FOR_ARRAY_RETURN_TYPE, "Whether to use Flow for array/collection return types when reactive is enabled. If false, will use List instead.", useFlowForArrayReturnType);
246246
addSwitch(INCLUDE_HTTP_REQUEST_CONTEXT, "Whether to include HttpServletRequest (blocking) or ServerWebExchange (reactive) as additional parameter in generated methods.", includeHttpRequestContext);
247247
addSwitch(USE_RESPONSE_ENTITY,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public SpringCodegen() {
283283
"Use `equalsIgnoreCase` when String for enum comparison",
284284
useEnumCaseInsensitive));
285285
cliOptions.add(CliOption.newBoolean(USE_SPRING_BOOT3,
286-
"Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.",
286+
"Generate code and provide dependencies for use with Spring Boot ≥ 3 (use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.",
287287
useSpringBoot3));
288288
cliOptions.add(CliOption.newBoolean(INCLUDE_HTTP_REQUEST_CONTEXT,
289289
"Whether to include HttpServletRequest (blocking) or ServerWebExchange (reactive) as additional parameter in generated methods. Defaults to 'true' for reactive and 'false' for blocking.",

modules/openapi-generator/src/main/resources/typescript-axios/common.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
110110
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
111111
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
112112
*/
113-
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
113+
// @ts-ignore
114+
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
114115
if (value instanceof Set) {
115116
return Array.from(value);
116117
} else {

samples/client/echo_api/typescript-axios/build/common.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
9696
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
9797
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
9898
*/
99-
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
99+
// @ts-ignore
100+
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
100101
if (value instanceof Set) {
101102
return Array.from(value);
102103
} else {

samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
9696
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
9797
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
9898
*/
99-
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
99+
// @ts-ignore
100+
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
100101
if (value instanceof Set) {
101102
return Array.from(value);
102103
} else {

samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
9696
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
9797
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
9898
*/
99-
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
99+
// @ts-ignore
100+
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
100101
if (value instanceof Set) {
101102
return Array.from(value);
102103
} else {

0 commit comments

Comments
 (0)