adding extra nodeClientOptions

This commit is contained in:
Kristof Vrolijkx
2016-04-25 23:00:48 +02:00
parent 28f444e808
commit c91f23c2ca
3 changed files with 35 additions and 16 deletions

View File

@@ -10,8 +10,8 @@ import io.swagger.codegen.languages.TypeScriptAngular2ClientCodegen;
public class TypeScriptAngular2ClientOptionsProvider implements OptionsProvider {
public static final String SORT_PARAMS_VALUE = "false";
public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true";
public static final String MODEL_PROPERTY_NAMING_VALUE = "camelCase";
public static final String NMP_NAME = "npmName";
private static final String MODEL_PROPERTY_NAMING_VALUE = "camelCase";
private static final String NMP_NAME = "npmName";
private static final String NMP_VERSION = "1.1.2";
private static final String NPM_REPOSITORY = "https://registry.npmjs.org";

View File

@@ -1,16 +1,22 @@
package io.swagger.codegen.options;
import io.swagger.codegen.CodegenConstants;
import com.google.common.collect.ImmutableMap;
import java.util.Map;
import io.swagger.codegen.CodegenConstants;
import io.swagger.codegen.languages.TypeScriptAngular2ClientCodegen;
public class TypeScriptNodeClientOptionsProvider implements OptionsProvider {
public static final String SORT_PARAMS_VALUE = "false";
public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true";
public static final String MODEL_PROPERTY_NAMING_VALUE = "camelCase";
private static final String NMP_NAME = "npmName";
private static final String NMP_VERSION = "1.1.2";
private static final String NPM_REPOSITORY = "https://registry.npmjs.org";
@Override
public String getLanguage() {
return "typescript-node";
@@ -22,6 +28,10 @@ public class TypeScriptNodeClientOptionsProvider implements OptionsProvider {
return builder.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_VALUE)
.put(TypeScriptAngular2ClientCodegen.NPM_NAME, NMP_NAME)
.put(TypeScriptAngular2ClientCodegen.NPM_VERSION, NMP_VERSION)
.put(TypeScriptAngular2ClientCodegen.SNAPSHOT, Boolean.FALSE.toString())
.put(TypeScriptAngular2ClientCodegen.NPM_REPOSITORY, NPM_REPOSITORY)
.build();
}