From d958480fea80cac7279f66c4f4fb7eba02d53219 Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Thu, 10 May 2018 14:50:42 +0900 Subject: [PATCH] Reaname R default package name (#411) * Rename package name * Update samples bin/openapi3/r-petstore.sh --- .../org/openapitools/codegen/languages/RClientCodegen.java | 6 +++--- .../src/main/resources/r/api_client.mustache | 6 +++--- .../src/main/resources/r/description.mustache | 2 +- samples/client/petstore/r_test/DESCRIPTION | 2 +- samples/client/petstore/r_test/R/ApiClient.r | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index 1f518808f5b..bdbc3be29b2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory; public class RClientCodegen extends DefaultCodegen implements CodegenConfig { static Logger LOGGER = LoggerFactory.getLogger(RClientCodegen.class); - protected String packageName = "swagger"; + protected String packageName = "openapitools"; protected String packageVersion = "1.0.0"; protected String apiDocPath = "docs/"; protected String modelDocPath = "docs/"; @@ -111,7 +111,7 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig { cliOptions.clear(); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "R package name (convention: lowercase).") - .defaultValue("swagger")); + .defaultValue("openapitools")); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "R package version.") .defaultValue("1.0.0")); cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC) @@ -126,7 +126,7 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig { if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) { setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME)); } else { - setPackageName("swagger"); + setPackageName("openapitools"); } if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) { diff --git a/modules/openapi-generator/src/main/resources/r/api_client.mustache b/modules/openapi-generator/src/main/resources/r/api_client.mustache index 4b2a33af251..9fb8a7be662 100644 --- a/modules/openapi-generator/src/main/resources/r/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/r/api_client.mustache @@ -2,10 +2,10 @@ #' ApiClient Class #' -#' Generic API client for Swagger client library builds. -#' Swagger generic API client. This client handles the client- +#' Generic API client for OpenAPI client library builds. +#' OpenAPI generic API client. This client handles the client- #' server communication, and is invariant across implementations. Specifics of -#' the methods and models for each application are generated from the Swagger +#' the methods and models for each application are generated from the OpenAPI Generator #' templates. #' #' NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/modules/openapi-generator/src/main/resources/r/description.mustache b/modules/openapi-generator/src/main/resources/r/description.mustache index 630619e38bc..bceeabc3919 100644 --- a/modules/openapi-generator/src/main/resources/r/description.mustache +++ b/modules/openapi-generator/src/main/resources/r/description.mustache @@ -1,7 +1,7 @@ Package: {{{packageName}}} Title: R Package Client for {{{appName}}} Version: {{packageVersion}} -Authors@R: person("OpenAPI Generator community", email = "apiteam@swagger.io", role = c("aut", "cre")) +Authors@R: person("OpenAPI Generator community", email = "team@openapitools.org", role = c("aut", "cre")) Description: {{{appDescription}}}{{^appDescription}}R Package Client for {{{appName}}}{{/appDescription}} Depends: R (>= 3.3.3) Encoding: UTF-8 diff --git a/samples/client/petstore/r_test/DESCRIPTION b/samples/client/petstore/r_test/DESCRIPTION index 11b1e12c069..8c1207be187 100644 --- a/samples/client/petstore/r_test/DESCRIPTION +++ b/samples/client/petstore/r_test/DESCRIPTION @@ -1,7 +1,7 @@ Package: petstore Title: R Package Client for OpenAPI Petstore Version: 1.0.0 -Authors@R: person("OpenAPI Generator community", email = "apiteam@swagger.io", role = c("aut", "cre")) +Authors@R: person("OpenAPI Generator community", email = "team@openapitools.org", role = c("aut", "cre")) Description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. Depends: R (>= 3.3.3) Encoding: UTF-8 diff --git a/samples/client/petstore/r_test/R/ApiClient.r b/samples/client/petstore/r_test/R/ApiClient.r index 24dff888b14..0ddd91ee062 100644 --- a/samples/client/petstore/r_test/R/ApiClient.r +++ b/samples/client/petstore/r_test/R/ApiClient.r @@ -9,10 +9,10 @@ #' ApiClient Class #' -#' Generic API client for Swagger client library builds. -#' Swagger generic API client. This client handles the client- +#' Generic API client for OpenAPI client library builds. +#' OpenAPI generic API client. This client handles the client- #' server communication, and is invariant across implementations. Specifics of -#' the methods and models for each application are generated from the Swagger +#' the methods and models for each application are generated from the OpenAPI Generator #' templates. #' #' NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).