fix number format for dart model

This commit is contained in:
wing328 2016-10-07 00:47:05 +08:00
parent 94cd2cb6a0
commit 574349570a
2 changed files with 5 additions and 3 deletions

View File

@ -58,6 +58,7 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
"String",
"bool",
"int",
"num",
"double")
);
instantiationTypes.put("array", "List");
@ -69,11 +70,12 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("List", "List");
typeMapping.put("boolean", "bool");
typeMapping.put("string", "String");
typeMapping.put("char", "String");
typeMapping.put("int", "int");
typeMapping.put("float", "double");
typeMapping.put("long", "int");
typeMapping.put("short", "int");
typeMapping.put("char", "String");
typeMapping.put("number", "num");
typeMapping.put("float", "double");
typeMapping.put("double", "double");
typeMapping.put("object", "Object");
typeMapping.put("integer", "int");

View File

@ -24,8 +24,8 @@ class ApiClient {
ApiClient({this.basePath: "http://petstore.swagger.io/v2"}) {
// Setup authentications (key: authentication name, value: authentication).
_authentications['petstore_auth'] = new OAuth();
_authentications['api_key'] = new ApiKeyAuth("header", "api_key");
_authentications['petstore_auth'] = new OAuth();
}
void addDefaultHeader(String key, String value) {