Merge branch 'master' of https://github.com/demonfiddler/swagger-codegen into demonfiddler-master

Conflicts:
	samples/client/petstore/javascript-promise/README.md
	samples/client/petstore/javascript-promise/docs/PetApi.md
	samples/client/petstore/javascript-promise/docs/StoreApi.md
	samples/client/petstore/javascript-promise/src/api/PetApi.js
	samples/client/petstore/javascript-promise/src/index.js
	samples/client/petstore/javascript/README.md
	samples/client/petstore/javascript/docs/PetApi.md
	samples/client/petstore/javascript/docs/StoreApi.md
	samples/client/petstore/javascript/src/api/PetApi.js
	samples/client/petstore/javascript/src/index.js
This commit is contained in:
wing328
2016-05-01 12:05:49 +08:00
41 changed files with 453 additions and 95 deletions

View File

@@ -30,6 +30,8 @@ public class JavaScriptClientOptionsTest extends AbstractOptionsTest {
protected void setExpectations() {
// Commented generic options not yet supported by JavaScript codegen.
new Expectations(clientCodegen) {{
clientCodegen.setInvokerPackage(JavaScriptOptionsProvider.INVOKER_PACKAGE_VALUE);
times = 1;
clientCodegen.setModelPackage(JavaScriptOptionsProvider.MODEL_PACKAGE_VALUE);
times = 1;
clientCodegen.setApiPackage(JavaScriptOptionsProvider.API_PACKAGE_VALUE);

View File

@@ -10,9 +10,9 @@ import java.util.Map;
public class JavaScriptOptionsProvider implements OptionsProvider {
public static final String ARTIFACT_ID_VALUE = "swagger-javascript-client-test";
public static final String INVOKER_PACKAGE_VALUE = "invoker";
public static final String MODEL_PACKAGE_VALUE = "model";
public static final String API_PACKAGE_VALUE = "api";
// public static final String INVOKER_PACKAGE_VALUE = "js";
public static final String SORT_PARAMS_VALUE = "false";
public static final String GROUP_ID_VALUE = "io.swagger.test";
public static final String ARTIFACT_VERSION_VALUE = "1.0.0-SNAPSHOT";
@@ -38,11 +38,11 @@ public class JavaScriptOptionsProvider implements OptionsProvider {
public JavaScriptOptionsProvider() {
// Commented generic options not yet supported by JavaScript codegen.
options = new ImmutableMap.Builder<String, String>()
.put(CodegenConstants.INVOKER_PACKAGE, INVOKER_PACKAGE_VALUE)
.put(CodegenConstants.MODEL_PACKAGE, MODEL_PACKAGE_VALUE)
.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.INVOKER_PACKAGE, INVOKER_PACKAGE_VALUE)
// .put(CodegenConstants.GROUP_ID, GROUP_ID_VALUE)
// .put(CodegenConstants.ARTIFACT_ID, ARTIFACT_ID_VALUE)
// .put(CodegenConstants.ARTIFACT_VERSION, ARTIFACT_VERSION_VALUE)