Skip to content

Commit cdafa5a

Browse files
altro3wing328
andauthored
Deprecate micronaut openapi generator (#20107)
* Deprecate micronaut openapi generator * update get help message --------- Co-authored-by: William Cheng <[email protected]>
1 parent 5ae8c03 commit cdafa5a

File tree

5 files changed

+46
-6
lines changed

5 files changed

+46
-6
lines changed

docs/generators/java-micronaut-client.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: Documentation for the java-micronaut-client Generator
1111
| generator type | CLIENT | |
1212
| generator language | Java | |
1313
| generator default templating engine | mustache | |
14-
| helpTxt | Generates a Java Micronaut Client. | |
14+
| helpTxt | Generates a Java Micronaut Client. IMPORTANT: this generator has been deprecated. Please use the official one instead: https://github.com/micronaut-projects/micronaut-openapi. | |
1515

1616
## CONFIG OPTIONS
1717
These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.

docs/generators/java-micronaut-server.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: Documentation for the java-micronaut-server Generator
1111
| generator type | SERVER | |
1212
| generator language | Java | |
1313
| generator default templating engine | mustache | |
14-
| helpTxt | Generates a Java Micronaut Server. | |
14+
| helpTxt | Generates a Java Micronaut Server. IMPORTANT: this generator has been deprecated. Please use the official one instead: https://github.com/micronaut-projects/micronaut-openapi. | |
1515

1616
## CONFIG OPTIONS
1717
These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.

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

+26
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727

2828
import static org.openapitools.codegen.CodegenConstants.INVOKER_PACKAGE;
2929

30+
/**
31+
* @deprecated WARNING! This generator is outdated. Please use the official generator for Micronaut:
32+
* <a href="https://github.com/micronaut-projects/micronaut-openapi">micronaut-openapi</a> with the help of the plugin for
33+
* <a href="https://github.com/micronaut-projects/micronaut-gradle-plugin">Gradle</a> and
34+
* <a href="https://github.com/micronaut-projects/micronaut-maven-plugin">Maven</a>.
35+
*/
36+
@SuppressWarnings("removal")
37+
@Deprecated(forRemoval = true)
3038
public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen implements BeanValidationFeatures, OptionalFeatures {
3139
public static final String OPT_TITLE = "title";
3240
public static final String OPT_BUILD = "build";
@@ -712,4 +720,22 @@ public void setSerializationLibrary(final String serializationLibrary) {
712720
throw new RuntimeException(sb.toString());
713721
}
714722
}
723+
724+
@Override
725+
public void postProcess() {
726+
System.out.println("################################################################################");
727+
System.out.println("# Thanks for using OpenAPI Generator. #");
728+
System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #");
729+
System.out.println("# https://opencollective.com/openapi_generator/donate #");
730+
System.out.println("# #");
731+
System.out.println("# WARNING! This generator is outdated. Please use the official generator for #");
732+
System.out.println("# Micronaut: https://github.com/micronaut-projects/micronaut-openapi with the #");
733+
System.out.println("# help of the plugin for Gradle #");
734+
System.out.println("# (https://github.com/micronaut-projects/micronaut-gradle-plugin) and Maven #");
735+
System.out.println("# (https://github.com/micronaut-projects/micronaut-maven-plugin). #");
736+
System.out.println("# #");
737+
System.out.println("# Supported generators for micronaut client / server side, java and kotlin #");
738+
System.out.println("# languages. #");
739+
System.out.println("################################################################################");
740+
}
715741
}

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

+9-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@
1111
import org.openapitools.codegen.meta.GeneratorMetadata;
1212
import org.openapitools.codegen.meta.Stability;
1313

14-
14+
/**
15+
* @deprecated WARNING! This generator is outdated. Please use the official generator for Micronaut:
16+
* <a href="https://github.com/micronaut-projects/micronaut-openapi">micronaut-openapi</a> with the help of the plugin for
17+
* <a href="https://github.com/micronaut-projects/micronaut-gradle-plugin">Gradle</a> and
18+
* <a href="https://github.com/micronaut-projects/micronaut-maven-plugin">Maven</a>.
19+
*/
20+
@SuppressWarnings("removal")
21+
@Deprecated(forRemoval = true)
1522
public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen {
1623

1724
public static final String OPT_CONFIGURE_AUTH = "configureAuth";
@@ -60,7 +67,7 @@ public String getName() {
6067

6168
@Override
6269
public String getHelp() {
63-
return "Generates a Java Micronaut Client.";
70+
return "Generates a Java Micronaut Client. IMPORTANT: this generator has been deprecated. Please use the official one instead: https://github.com/micronaut-projects/micronaut-openapi.";
6471
}
6572

6673
@Override

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

+9-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@
1212
import java.util.List;
1313
import java.util.stream.Collectors;
1414

15-
15+
/**
16+
* @deprecated WARNING! This generator is outdated. Please use the official generator for Micronaut:
17+
* <a href="https://github.com/micronaut-projects/micronaut-openapi">micronaut-openapi</a> with the help of the plugin for
18+
* <a href="https://github.com/micronaut-projects/micronaut-gradle-plugin">Gradle</a> and
19+
* <a href="https://github.com/micronaut-projects/micronaut-maven-plugin">Maven</a>.
20+
*/
21+
@SuppressWarnings("removal")
22+
@Deprecated(forRemoval = true)
1623
public class JavaMicronautServerCodegen extends JavaMicronautAbstractCodegen {
1724
public static final String OPT_CONTROLLER_PACKAGE = "controllerPackage";
1825
public static final String OPT_GENERATE_CONTROLLER_FROM_EXAMPLES = "generateControllerFromExamples";
@@ -86,7 +93,7 @@ public String getName() {
8693

8794
@Override
8895
public String getHelp() {
89-
return "Generates a Java Micronaut Server.";
96+
return "Generates a Java Micronaut Server. IMPORTANT: this generator has been deprecated. Please use the official one instead: https://github.com/micronaut-projects/micronaut-openapi.";
9097
}
9198

9299
@Override

0 commit comments

Comments
 (0)