You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/generators/java-camel.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
109
109
|title|server title name or client service name||OpenAPI Spring|
110
110
|unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).||false|
111
111
|useBeanValidation|Use BeanValidation API annotations||true|
112
-
|useDeductionForOneOfInterfaces|whether to use deduction for generated oneOf interfaces||false|
112
+
|useDeductionForOneOfInterfaces|Annotate discriminator-free oneOf interfaces with Jackson's @JsonTypeInfo(use = Id.DEDUCTION) and @JsonSubTypes so the concrete subtype is resolved from the JSON field set rather than a type-tag property. Has no effect when a discriminator is present (name-based resolution is used instead). Requires subtypes to have structurally distinct sets of properties.||false|
113
113
|useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison||false|
114
114
|useFeignClientContextId|Whether to generate Feign client with contextId parameter.||true|
115
115
|useFeignClientUrl|Whether to generate Feign client with url parameter.||true|
Copy file name to clipboardExpand all lines: docs/generators/kotlin-spring.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
61
61
|substituteGenericPagedModel|Detect schemas that represent paginated responses (an object with a 'content' array property and a 'page' pagination-metadata property) and replace their generated references with PagedModel<T>. By default this uses a generated type in the config package (default 'org.openapitools.configuration'), but `importMappings.PagedModel` can override it to a custom/FQCN-mapped type. The detected page schemas and the pagination metadata schema are suppressed from code generation. Only applies when library=spring-boot or spring-declarative-http-interface.||false|
62
62
|title|server title name or client service name||OpenAPI Kotlin Spring|
63
63
|useBeanValidation|Use BeanValidation API annotations to validate data types||true|
64
+
|useDeductionForOneOfInterfaces|Annotate discriminator-free oneOf interfaces with Jackson's @JsonTypeInfo(use = Id.DEDUCTION) and @JsonSubTypes so the concrete subtype is resolved from the JSON field set rather than a type-tag property. Has no effect when a discriminator is present (name-based resolution is used instead). Requires subtypes to have structurally distinct sets of properties.||false|
64
65
|useFeignClientUrl|Whether to generate Feign client with url parameter.||true|
65
66
|useFlowForArrayReturnType|Whether to use Flow for array/collection return types when reactive is enabled. If false, will use List instead.||true|
66
67
|useJackson3|Use Jackson 3 dependencies (tools.jackson package). Only available with `useSpringBoot4`. Defaults to true when `useSpringBoot4` is enabled. Incompatible with `openApiNullable`.||false|
Copy file name to clipboardExpand all lines: docs/generators/spring.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
102
102
|title|server title name or client service name||OpenAPI Spring|
103
103
|unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).||false|
104
104
|useBeanValidation|Use BeanValidation API annotations||true|
105
-
|useDeductionForOneOfInterfaces|whether to use deduction for generated oneOf interfaces||false|
105
+
|useDeductionForOneOfInterfaces|Annotate discriminator-free oneOf interfaces with Jackson's @JsonTypeInfo(use = Id.DEDUCTION) and @JsonSubTypes so the concrete subtype is resolved from the JSON field set rather than a type-tag property. Has no effect when a discriminator is present (name-based resolution is used instead). Requires subtypes to have structurally distinct sets of properties.||false|
106
106
|useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison||false|
107
107
|useFeignClientContextId|Whether to generate Feign client with contextId parameter.||true|
108
108
|useFeignClientUrl|Whether to generate Feign client with url parameter.||true|
"Use `ofNullable` instead of just `of` to accept null values when using Optional.",
339
338
optionalAcceptNullable));
340
339
341
-
cliOptions.add(CliOption.newBoolean(USE_DEDUCTION_FOR_ONE_OF_INTERFACES, "whether to use deduction for generated oneOf interfaces", useDeductionForOneOfInterfaces));
"Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces.")
Copy file name to clipboardExpand all lines: modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5983,6 +5983,40 @@ public void testOneOfRefEnumDiscriminatorResolvesType() throws IOException {
5983
5983
);
5984
5984
}
5985
5985
5986
+
@Test(description = "oneOf without discriminator with useDeductionForOneOfInterfaces generates @JsonTypeInfo(DEDUCTION) annotation")
0 commit comments