diff --git a/README.md b/README.md index 4b4548a2e49..56b21298365 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se | | Languages/Frameworks | |-|-| -**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later), **C++** (cpprest, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 7.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs) +**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 7.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs) **Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed), **Erlang**, **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin** (Spring Boot, Ktor), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) **API documentation generators** | **HTML**, **Confluence Wiki** **Configuration files** | [**Apache2**](https://httpd.apache.org/) @@ -596,7 +596,6 @@ OpenAPI Generator core team members are contributors who have been making signif Here is a list of template creators: * API Clients: * Ada: @stcarrez - * Akka-Scala: @cchafer * Apex: @asnelling * Bash: @bkryza * C: @PowerOfCreation @zhemant [:heart:](https://www.patreon.com/zhemant) @@ -642,6 +641,7 @@ Here is a list of template creators: * Rust: @farcaller * Rust (rust-server): @metaswitch * Scala (scalaz & http4s): @tbrown1979 + * Scala (Akka): @cchafer * Swift: @tkqubo * Swift 3: @hexelon * Swift 4: @ehyche diff --git a/bin/openapi3/scala-akka-petstore.sh b/bin/openapi3/scala-akka-petstore.sh index 34862c3beb7..e7aa8ad499a 100755 --- a/bin/openapi3/scala-akka-petstore.sh +++ b/bin/openapi3/scala-akka-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id "scala-akka-petstore-client" -t modules/openapi-generator/src/main/resources/scala-akka-client -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g akka-scala -o samples/client/petstore/scala-akka $@" +ags="generate --artifact-id "scala-akka-petstore-client" -t modules/openapi-generator/src/main/resources/scala-akka-client -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-akka -o samples/client/petstore/scala-akka $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/scala-httpclient-petstore.sh b/bin/openapi3/scala-httpclient-petstore.sh index 67e67769766..d3629abc474 100755 --- a/bin/openapi3/scala-httpclient-petstore.sh +++ b/bin/openapi3/scala-httpclient-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/scala-httpclient -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala -o samples/client/petstore/scala-httpclient $@" +ags="generate -t modules/openapi-generator/src/main/resources/scala-httpclient -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-httpclient-deprecated -o samples/client/petstore/scala-httpclient $@" java $JAVA_OPTS -jar $executable $ags diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index 0e8269987ba..e5990ce1a56 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -58,23 +58,6 @@ public class CodegenConfigurator implements Serializable { public static final Logger LOGGER = LoggerFactory.getLogger(CodegenConfigurator.class); - private static Map nameMigrationMap = new HashMap<>(); - - static { - nameMigrationMap.put("akka-scala", new ScalaAkkaClientCodegen().getName()); - nameMigrationMap.put("scala", new ScalaHttpClientCodegen().getName()); - nameMigrationMap.put("jaxrs", new JavaJerseyServerCodegen().getName()); - nameMigrationMap.put("qt5cpp", new CppQt5ClientCodegen().getName()); - nameMigrationMap.put("cpprest", new CppRestSdkClientCodegen().getName()); - nameMigrationMap.put("tizen", new CppTizenClientCodegen().getName()); - nameMigrationMap.put("sinatra", new RubySinatraServerCodegen().getName()); - nameMigrationMap.put("swift", new SwiftClientCodegen().getName()); - nameMigrationMap.put("lumen", new PhpLumenServerCodegen().getName()); - nameMigrationMap.put("slim", new PhpSlimServerCodegen().getName()); - nameMigrationMap.put("ze-ph", new PhpZendExpressivePathHandlerServerCodegen().getName()); - nameMigrationMap.put("nancyfx", new CSharpNancyFXServerCodegen().getName()); - } - private String generatorName; private String inputSpec; private String outputDir; @@ -120,8 +103,6 @@ public class CodegenConfigurator implements Serializable { this.setOutputDir("."); } - // TODO: When setLang is removed, please remove nameMigrationMap and its usage(s). - /** * Set the "language". This has drifted away from language-only to include framework and * hyphenated generator types as well as language. @@ -150,15 +131,7 @@ public class CodegenConfigurator implements Serializable { * @return The fluent instance of {@link CodegenConfigurator} */ public CodegenConfigurator setGeneratorName(final String generatorName) { - if (nameMigrationMap.containsKey(generatorName)) { - String newValue = nameMigrationMap.get(generatorName); - LOGGER.warn(String.format(Locale.ROOT, - "The name '%s' is a deprecated. Please update to the new name of '%s'.", - generatorName, newValue)); - this.generatorName = newValue; - } else { - this.generatorName = generatorName; - } + this.generatorName = generatorName; return this; } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java index 61d8781cf7b..a7346eb6154 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java @@ -38,7 +38,7 @@ public class PhpSlimServerOptionsProvider implements OptionsProvider { @Override public String getLanguage() { - return "slim"; + return "php-slim"; } @Override diff --git a/modules/openapi-generator/src/test/resources/integrationtests/scala/client/required-attributes.sh b/modules/openapi-generator/src/test/resources/integrationtests/scala/client/required-attributes.sh index 8bf74290a1a..43fe0a87a6c 100755 --- a/modules/openapi-generator/src/test/resources/integrationtests/scala/client/required-attributes.sh +++ b/modules/openapi-generator/src/test/resources/integrationtests/scala/client/required-attributes.sh @@ -11,5 +11,5 @@ declare curdir=$(cd $(dirname "${BASH_SOURCE}") && pwd) declare clijar=${SWAGGER_CODEGEN_CLI_JAR:-$(cd $curdir && cd ../../../../../../../swagger-codegen-cli/target/ && echo $PWD)/swagger-codegen-cli.jar} exec \java ${opts} -jar ${clijar} generate \ - -i ${prefix}-spec.json -g scala \ + -i ${prefix}-spec.json -g scala-httpclient-deprecated \ -o ${prefix}-expected;