Created by: karismann
PR checklist
-
Read the contribution guidelines. -
Ran the shell script under ./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
. -
Filed the PR against the correct branch: master
,. Default:3.4.x
,4.0.x
master
.
Description of the PR
- fix #1795 (closed) : test path/package name for generated test in case of composed generated name (i.e java-newframework)
- use the camelized generated name everywhere in the generation script (remove blank and underscore)
- add an error if no generator type are in parameter (i.e. ./new.sh -n 'java-greatframework' -t)
here is some test done with the new version of the script :
$ ./new.sh -n 'java-greatframework' -s -t
Creating modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaGreatframeworkServerCodegen.java
Creating modules/openapi-generator/src/main/resources/java-greatframework-server/README.mustache
Creating modules/openapi-generator/src/main/resources/java-greatframework-server/model.mustache
Creating modules/openapi-generator/src/main/resources/java-greatframework-server/api.mustache
Creating bin/windows/java-greatframework-server-petstore.bat
Creating bin/java-greatframework-server-petstore.sh
Creating modules/openapi-generator/src/test/java/org/openapitools/codegen/java/greatframework/JavaGreatframeworkServerCodegenTest.java
Creating modules/openapi-generator/src/test/java/org/openapitools/codegen/java/greatframework/JavaGreatframeworkServerCodegenModelTest.java
Creating modules/openapi-generator/src/test/java/org/openapitools/codegen/java/greatframework/JavaGreatframeworkServerCodegenOptionsTest.java
Creating modules/openapi-generator/src/test/java/org/openapitools/codegen/options/JavaGreatframeworkServerCodegenOptionsProvider.java
Finished.
$ ./new.sh -n 'java greatframework3' -t -c
Creating modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaGreatframework3ClientCodegen.java
Creating modules/openapi-generator/src/main/resources/java-greatframework3-client/README.mustache
Creating modules/openapi-generator/src/main/resources/java-greatframework3-client/model.mustache
Creating modules/openapi-generator/src/main/resources/java-greatframework3-client/api.mustache
Creating bin/windows/java-greatframework3-client-petstore.bat
Creating bin/java-greatframework3-client-petstore.sh
Creating modules/openapi-generator/src/test/java/org/openapitools/codegen/java/greatframework3/JavaGreatframework3ClientCodegenTest.java
Creating modules/openapi-generator/src/test/java/org/openapitools/codegen/java/greatframework3/JavaGreatframework3ClientCodegenModelTest.java
Creating modules/openapi-generator/src/test/java/org/openapitools/codegen/java/greatframework3/JavaGreatframework3ClientCodegenOptionsTest.java
Creating modules/openapi-generator/src/test/java/org/openapitools/codegen/options/JavaGreatframework3ClientCodegenOptionsProvider.java
Finished.
$ ./new.sh -n 'java-greatframework' -t
[error] You may set a generator type