Deprecate micronaut openapi generator (#20107)

* Deprecate micronaut openapi generator

* update get help message

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
altro3 2024-11-24 22:26:37 +07:00 committed by GitHub
parent 5ae8c03e6f
commit cdafa5a0cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 46 additions and 6 deletions

View File

@ -11,7 +11,7 @@ title: Documentation for the java-micronaut-client Generator
| generator type | CLIENT | |
| generator language | Java | |
| generator default templating engine | mustache | |
| helpTxt | Generates a Java Micronaut Client. | |
| 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. | |
## CONFIG OPTIONS
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.

View File

@ -11,7 +11,7 @@ title: Documentation for the java-micronaut-server Generator
| generator type | SERVER | |
| generator language | Java | |
| generator default templating engine | mustache | |
| helpTxt | Generates a Java Micronaut Server. | |
| 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. | |
## CONFIG OPTIONS
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.

View File

@ -27,6 +27,14 @@ import java.util.stream.Collectors;
import static org.openapitools.codegen.CodegenConstants.INVOKER_PACKAGE;
/**
* @deprecated WARNING! This generator is outdated. Please use the official generator for Micronaut:
* <a href="https://github.com/micronaut-projects/micronaut-openapi">micronaut-openapi</a> with the help of the plugin for
* <a href="https://github.com/micronaut-projects/micronaut-gradle-plugin">Gradle</a> and
* <a href="https://github.com/micronaut-projects/micronaut-maven-plugin">Maven</a>.
*/
@SuppressWarnings("removal")
@Deprecated(forRemoval = true)
public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen implements BeanValidationFeatures, OptionalFeatures {
public static final String OPT_TITLE = "title";
public static final String OPT_BUILD = "build";
@ -712,4 +720,22 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i
throw new RuntimeException(sb.toString());
}
}
@Override
public void postProcess() {
System.out.println("################################################################################");
System.out.println("# Thanks for using OpenAPI Generator. #");
System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #");
System.out.println("# https://opencollective.com/openapi_generator/donate #");
System.out.println("# #");
System.out.println("# WARNING! This generator is outdated. Please use the official generator for #");
System.out.println("# Micronaut: https://github.com/micronaut-projects/micronaut-openapi with the #");
System.out.println("# help of the plugin for Gradle #");
System.out.println("# (https://github.com/micronaut-projects/micronaut-gradle-plugin) and Maven #");
System.out.println("# (https://github.com/micronaut-projects/micronaut-maven-plugin). #");
System.out.println("# #");
System.out.println("# Supported generators for micronaut client / server side, java and kotlin #");
System.out.println("# languages. #");
System.out.println("################################################################################");
}
}

View File

@ -11,7 +11,14 @@ import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.meta.GeneratorMetadata;
import org.openapitools.codegen.meta.Stability;
/**
* @deprecated WARNING! This generator is outdated. Please use the official generator for Micronaut:
* <a href="https://github.com/micronaut-projects/micronaut-openapi">micronaut-openapi</a> with the help of the plugin for
* <a href="https://github.com/micronaut-projects/micronaut-gradle-plugin">Gradle</a> and
* <a href="https://github.com/micronaut-projects/micronaut-maven-plugin">Maven</a>.
*/
@SuppressWarnings("removal")
@Deprecated(forRemoval = true)
public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen {
public static final String OPT_CONFIGURE_AUTH = "configureAuth";
@ -60,7 +67,7 @@ public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen {
@Override
public String getHelp() {
return "Generates a Java Micronaut Client.";
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.";
}
@Override

View File

@ -12,7 +12,14 @@ import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
/**
* @deprecated WARNING! This generator is outdated. Please use the official generator for Micronaut:
* <a href="https://github.com/micronaut-projects/micronaut-openapi">micronaut-openapi</a> with the help of the plugin for
* <a href="https://github.com/micronaut-projects/micronaut-gradle-plugin">Gradle</a> and
* <a href="https://github.com/micronaut-projects/micronaut-maven-plugin">Maven</a>.
*/
@SuppressWarnings("removal")
@Deprecated(forRemoval = true)
public class JavaMicronautServerCodegen extends JavaMicronautAbstractCodegen {
public static final String OPT_CONTROLLER_PACKAGE = "controllerPackage";
public static final String OPT_GENERATE_CONTROLLER_FROM_EXAMPLES = "generateControllerFromExamples";
@ -86,7 +93,7 @@ public class JavaMicronautServerCodegen extends JavaMicronautAbstractCodegen {
@Override
public String getHelp() {
return "Generates a Java Micronaut Server.";
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.";
}
@Override