Added 'modelPropertyNaming' option for Scala (#3685)

* Closed #3675
1. Added 'modelPropertyNaming' option for scala
2. Executed ./bin/scala-petstore.sh (no changes).

* Removed unwanted code #3675
This commit is contained in:
Arpit Suthar
2016-09-01 15:52:03 +05:30
committed by wing328
parent 062e6fc3ac
commit e7ec360ba8
3 changed files with 44 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ public class ScalaClientOptionsProvider implements OptionsProvider {
public static final String API_PACKAGE_VALUE = "apiPackage";
public static final String SORT_PARAMS_VALUE = "false";
public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true";
public static final String MODEL_PROPERTY_NAMING = "modelPropertyNaming";
@Override
public String getLanguage() {
@@ -24,6 +25,7 @@ public class ScalaClientOptionsProvider implements OptionsProvider {
.put(CodegenConstants.API_PACKAGE, API_PACKAGE_VALUE)
.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, SORT_PARAMS_VALUE)
.put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE)
.put(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING)
.build();
}

View File

@@ -32,6 +32,8 @@ public class ScalaClientOptionsTest extends AbstractOptionsTest {
times = 1;
clientCodegen.setSortParamsByRequiredFlag(Boolean.valueOf(ScalaClientOptionsProvider.SORT_PARAMS_VALUE));
times = 1;
clientCodegen.setModelPropertyNaming(ScalaClientOptionsProvider.MODEL_PROPERTY_NAMING);
times = 1;
}};
}
}