forked from loafle/openapi-generator-original
This commit is contained in:
parent
076b88429e
commit
c2c91e2d2e
@ -95,7 +95,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
|
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
|
||||||
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|
||||||
|useOptional|Use Optional container for optional parameters| |false|
|
|useOptional|Use Optional container for optional parameters| |false|
|
||||||
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports).| |false|
|
|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|
|
||||||
|useSpringController|Annotate the generated API as a Spring Controller| |false|
|
|useSpringController|Annotate the generated API as a Spring Controller| |false|
|
||||||
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
|
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
|
||||||
|useTags|use tags for creating interface and controller classnames| |false|
|
|useTags|use tags for creating interface and controller classnames| |false|
|
||||||
|
@ -88,7 +88,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
|
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
|
||||||
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|
||||||
|useOptional|Use Optional container for optional parameters| |false|
|
|useOptional|Use Optional container for optional parameters| |false|
|
||||||
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports).| |false|
|
|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|
|
||||||
|useSpringController|Annotate the generated API as a Spring Controller| |false|
|
|useSpringController|Annotate the generated API as a Spring Controller| |false|
|
||||||
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
|
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
|
||||||
|useTags|use tags for creating interface and controller classnames| |false|
|
|useTags|use tags for creating interface and controller classnames| |false|
|
||||||
|
@ -241,7 +241,7 @@ public class SpringCodegen extends AbstractJavaCodegen
|
|||||||
"Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies",
|
"Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies",
|
||||||
useSwaggerUI));
|
useSwaggerUI));
|
||||||
cliOptions.add(CliOption.newBoolean(USE_SPRING_BOOT3,
|
cliOptions.add(CliOption.newBoolean(USE_SPRING_BOOT3,
|
||||||
"Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports).",
|
"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));
|
useSpringBoot3));
|
||||||
|
|
||||||
supportedLibraries.put(SPRING_BOOT, "Spring-boot Server application.");
|
supportedLibraries.put(SPRING_BOOT, "Spring-boot Server application.");
|
||||||
@ -473,6 +473,8 @@ public class SpringCodegen extends AbstractJavaCodegen
|
|||||||
if (AnnotationLibrary.SWAGGER1.equals(getAnnotationLibrary())) {
|
if (AnnotationLibrary.SWAGGER1.equals(getAnnotationLibrary())) {
|
||||||
throw new IllegalArgumentException(AnnotationLibrary.SWAGGER1.getPropertyName() + " is not supported with Spring Boot > 3.x");
|
throw new IllegalArgumentException(AnnotationLibrary.SWAGGER1.getPropertyName() + " is not supported with Spring Boot > 3.x");
|
||||||
}
|
}
|
||||||
|
useJakartaEe=true;
|
||||||
|
additionalProperties.put(USE_JAKARTA_EE, useJakartaEe);
|
||||||
applyJakartaPackage();
|
applyJakartaPackage();
|
||||||
}
|
}
|
||||||
writePropertyBack(USE_SPRING_BOOT3, isUseSpringBoot3());
|
writePropertyBack(USE_SPRING_BOOT3, isUseSpringBoot3());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user