Skip to content

Commit be25047

Browse files
committed
feature(jackson3) add jackson3 support for spring generator
* add 'useJackson3' option * add 'useSpringBoot4' option * add support for RestClient in spring-http-interfaces See #22294
1 parent aaa3500 commit be25047

File tree

61 files changed

+795
-127
lines changed

Some content is hidden

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

61 files changed

+795
-127
lines changed

docs/generators/groovy.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
3030
|camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false|
3131
|containerDefaultToNull|Set containers (array, set, map) default to null| |false|
3232
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|legacy|
33-
|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null|
3433
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
3534
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
3635
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|

docs/generators/java-camel.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
4444
|configPackage|configuration package for generated code| |org.openapitools.configuration|
4545
|containerDefaultToNull|Set containers (array, set, map) default to null| |false|
4646
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|java8|
47-
|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null|
4847
|delegatePattern|Whether to generate the server files using the delegate pattern| |false|
4948
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
5049
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
@@ -106,12 +105,14 @@ These options may be applied as additional-properties (cli) or configOptions (pl
106105
|useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false|
107106
|useFeignClientContextId|Whether to generate Feign client with contextId parameter.| |true|
108107
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
108+
|useJackson3|Set it in order to use jackson 3 dependencies (only allowed when `useSpringBoot4` is set and incompatible with `openApiNullable`).| |false|
109109
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
110110
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |true|
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 &ge; 3 (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.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
115+
|useSpringBoot4|Generate code and provide dependencies for use with Spring Boot 4.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
115116
|useSpringBuiltInValidation|Disable `@Validated` at the class level when using built-in validation.| |false|
116117
|useSpringController|Annotate the generated API as a Spring Controller| |false|
117118
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|

docs/generators/java-dubbo.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
3434
|configPackage|configuration package for generated code| |org.openapitools.configuration|
3535
|containerDefaultToNull|Set containers (array, set, map) default to null| |false|
3636
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|java8|
37-
|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null|
3837
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
3938
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
4039
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|

docs/generators/java-helidon-client.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
3333
|configKey|Config key in @RegisterRestClient. Default to none.| |null|
3434
|containerDefaultToNull|Set containers (array, set, map) default to null| |false|
3535
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|java8|
36-
|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null|
3736
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
3837
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
3938
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|

docs/generators/java-helidon-server.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
3232
|camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false|
3333
|containerDefaultToNull|Set containers (array, set, map) default to null| |false|
3434
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|java8|
35-
|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null|
3635
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
3736
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
3837
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|

docs/generators/java-inflector.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
3232
|camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false|
3333
|containerDefaultToNull|Set containers (array, set, map) default to null| |false|
3434
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|legacy|
35-
|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null|
3635
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
3736
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
3837
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|

docs/generators/java-micronaut-client.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
4141
|dateFormat|Specify the format pattern of date as a string| |null|
4242
|dateLibrary|Option. Date library to use|<dl><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|java8|
4343
|datetimeFormat|Specify the format pattern of date-time as a string| |null|
44-
|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null|
4544
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
4645
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
4746
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|

docs/generators/java-micronaut-server.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
3636
|dateFormat|Specify the format pattern of date as a string| |null|
3737
|dateLibrary|Option. Date library to use|<dl><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|java8|
3838
|datetimeFormat|Specify the format pattern of date-time as a string| |null|
39-
|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null|
4039
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
4140
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
4241
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|

docs/generators/java-microprofile.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
3737
|configKeyFromClassName|If true, set tag as key in @RegisterRestClient. Default to false. Only `microprofile` supports this option.| |null|
3838
|containerDefaultToNull|Set containers (array, set, map) default to null| |false|
3939
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|java8|
40-
|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null|
4140
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
4241
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
4342
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|

docs/generators/java-msf4j.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
3232
|camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false|
3333
|containerDefaultToNull|Set containers (array, set, map) default to null| |false|
3434
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|legacy|
35-
|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null|
3635
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
3736
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
3837
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|

0 commit comments

Comments
 (0)