From 3597621fbc8b3fedd63892201e29ffb33ce5007e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 19 May 2022 01:23:27 +0800 Subject: [PATCH] [R] Use snake_case in method parameter names (#12390) * use snake_case in method parameter names * update doc --- bin/configs/r-client.yaml | 2 +- docs/generators/r.md | 1 + .../codegen/languages/RClientCodegen.java | 26 +- .../src/test/resources/3_0/r/petstore.yaml | 768 ++++++++++++++++++ .../petstore/R/.openapi-generator/FILES | 2 + samples/client/petstore/R/NAMESPACE | 1 + samples/client/petstore/R/R/fake_api.R | 127 +++ samples/client/petstore/R/R/pet_api.R | 174 ++-- samples/client/petstore/R/R/store_api.R | 60 +- samples/client/petstore/R/R/user_api.R | 123 ++- samples/client/petstore/R/README.md | 1 + samples/client/petstore/R/docs/FakeApi.md | 54 ++ samples/client/petstore/R/docs/PetApi.md | 78 +- samples/client/petstore/R/docs/StoreApi.md | 28 +- samples/client/petstore/R/docs/UserApi.md | 76 +- .../petstore/R/tests/testthat/test_fake_api.R | 20 + .../petstore/R/tests/testthat/test_petstore.R | 2 +- 17 files changed, 1319 insertions(+), 224 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/r/petstore.yaml create mode 100644 samples/client/petstore/R/R/fake_api.R create mode 100644 samples/client/petstore/R/docs/FakeApi.md create mode 100644 samples/client/petstore/R/tests/testthat/test_fake_api.R diff --git a/bin/configs/r-client.yaml b/bin/configs/r-client.yaml index 98a79ecb29e..9043e19da79 100644 --- a/bin/configs/r-client.yaml +++ b/bin/configs/r-client.yaml @@ -1,6 +1,6 @@ generatorName: r outputDir: samples/client/petstore/R -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/r/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/r httpUserAgent: PetstoreAgent additionalProperties: diff --git a/docs/generators/r.md b/docs/generators/r.md index 15512fa01b5..dbd0b885956 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -51,6 +51,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl