Add missing UUID mapping for some generators (#5474)

* remove trailing space in cpprest, update samples

* add missing uuid mapping for generators
This commit is contained in:
wing328 2017-04-25 21:16:17 +08:00 committed by GitHub
parent 00651dd340
commit 745951c1ce
9 changed files with 9 additions and 0 deletions

View File

@ -178,6 +178,7 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("integer", "integer");
typeMapping.put("ByteArray", "string");
typeMapping.put("binary", "binary");
typeMapping.put("UUID", "string");
/**
* Additional Properties. These values can be passed to the templates and

View File

@ -114,6 +114,7 @@ public class CppRestClientCodegen extends DefaultCodegen implements CodegenConfi
typeMapping.put("object", "Object");
typeMapping.put("binary", "std::string");
typeMapping.put("number", "double");
typeMapping.put("UUID", "utility::string_t");
super.importMapping = new HashMap<String, String>();
importMapping.put("std::vector", "#include <vector>");

View File

@ -86,6 +86,7 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("Date", "DateTime");
typeMapping.put("date", "DateTime");
typeMapping.put("File", "MultipartFile");
typeMapping.put("UUID", "String");
//TODO binary should be mapped to byte array
// mapped to String as a workaround
typeMapping.put("binary", "String");

View File

@ -63,6 +63,7 @@ public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig
typeMapping.put("DateTime", "Date");
typeMapping.put("object", "Object");
typeMapping.put("file", "File");
typeMapping.put("UUID", "String");
//TODO binary should be mapped to byte array
// mapped to String as a workaround
typeMapping.put("binary", "String");

View File

@ -67,6 +67,7 @@ public class FlaskConnexionCodegen extends DefaultCodegen implements CodegenConf
typeMapping.put("DateTime", "datetime");
typeMapping.put("object", "object");
typeMapping.put("file", "file");
typeMapping.put("UUID", "str");
// set the output folder here
outputFolder = "generated-code/connexion";

View File

@ -117,6 +117,7 @@ public class GoServerCodegen extends DefaultCodegen implements CodegenConfig {
// the correct solution is to use []byte
typeMapping.put("binary", "string");
typeMapping.put("ByteArray", "string");
typeMapping.put("UUID", "string");
importMapping = new HashMap<String, String>();
importMapping.put("time.Time", "time");

View File

@ -145,6 +145,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
typeMapping.put("number", "Double");
typeMapping.put("integer", "Int");
typeMapping.put("any", "Value");
typeMapping.put("UUID", "Text");
importMapping.clear();
importMapping.put("Map", "qualified Data.Map as Map");

View File

@ -67,6 +67,7 @@ public class SinatraServerCodegen extends DefaultCodegen implements CodegenConfi
//TODO binary should be mapped to byte array
// mapped to String as a workaround
typeMapping.put("binary", "string");
typeMapping.put("UUID", "string");
// remove modelPackage and apiPackage added by default
cliOptions.clear();

View File

@ -76,6 +76,7 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig
typeMapping.put("map", "HashMap");
typeMapping.put("number", "Long");
typeMapping.put("object", PREFIX + "Object");
typeMapping.put("UUID", "String");
//TODO binary should be mapped to byte array
// mapped to String as a workaround
typeMapping.put("binary", "String");