diff --git a/modules/swagger-codegen-cli/pom.xml b/modules/swagger-codegen-cli/pom.xml
index e484393bb14..367d2163637 100644
--- a/modules/swagger-codegen-cli/pom.xml
+++ b/modules/swagger-codegen-cli/pom.xml
@@ -3,7 +3,7 @@
io.swagger
swagger-codegen-project
- 2.2.2-SNAPSHOT
+ 2.3.0-SNAPSHOT
../..
4.0.0
diff --git a/modules/swagger-codegen-maven-plugin/pom.xml b/modules/swagger-codegen-maven-plugin/pom.xml
index 4df64ca4e61..8ecad771bee 100644
--- a/modules/swagger-codegen-maven-plugin/pom.xml
+++ b/modules/swagger-codegen-maven-plugin/pom.xml
@@ -6,7 +6,7 @@
io.swagger
swagger-codegen-project
- 2.2.2-SNAPSHOT
+ 2.3.0-SNAPSHOT
../..
swagger-codegen-maven-plugin
diff --git a/modules/swagger-codegen/pom.xml b/modules/swagger-codegen/pom.xml
index 21e44ce2547..15b988c8ab6 100644
--- a/modules/swagger-codegen/pom.xml
+++ b/modules/swagger-codegen/pom.xml
@@ -3,7 +3,7 @@
io.swagger
swagger-codegen-project
- 2.2.2-SNAPSHOT
+ 2.3.0-SNAPSHOT
../..
4.0.0
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java
index 46732703c34..02098d98b66 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java
@@ -255,10 +255,8 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
supportingFiles.add(new SupportingFile("Object-body.mustache", coreFileFolder(), classPrefix + "Object.m"));
supportingFiles.add(new SupportingFile("QueryParamCollection-header.mustache", coreFileFolder(), classPrefix + "QueryParamCollection.h"));
supportingFiles.add(new SupportingFile("QueryParamCollection-body.mustache", coreFileFolder(), classPrefix + "QueryParamCollection.m"));
- supportingFiles.add(new SupportingFile("ApiClient-header.mustache", coreFileFolder(), classPrefix + "ApiClient.h"));
+ supportingFiles.add(new SupportingFile("ApiClient-header.mustache", coreFileFolder(), classPrefix + "ApiClient.h"));
supportingFiles.add(new SupportingFile("ApiClient-body.mustache", coreFileFolder(), classPrefix + "ApiClient.m"));
- supportingFiles.add(new SupportingFile("JSONResponseSerializer-header.mustache", coreFileFolder(), classPrefix + "JSONResponseSerializer.h"));
- supportingFiles.add(new SupportingFile("JSONResponseSerializer-body.mustache", coreFileFolder(), classPrefix + "JSONResponseSerializer.m"));
supportingFiles.add(new SupportingFile("JSONRequestSerializer-body.mustache", coreFileFolder(), classPrefix + "JSONRequestSerializer.m"));
supportingFiles.add(new SupportingFile("JSONRequestSerializer-header.mustache", coreFileFolder(), classPrefix + "JSONRequestSerializer.h"));
supportingFiles.add(new SupportingFile("ResponseDeserializer-body.mustache", coreFileFolder(), classPrefix + "ResponseDeserializer.m"));
@@ -269,8 +267,11 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
supportingFiles.add(new SupportingFile("Logger-header.mustache", coreFileFolder(), classPrefix + "Logger.h"));
supportingFiles.add(new SupportingFile("JSONValueTransformer+ISO8601-body.mustache", coreFileFolder(), "JSONValueTransformer+ISO8601.m"));
supportingFiles.add(new SupportingFile("JSONValueTransformer+ISO8601-header.mustache", coreFileFolder(), "JSONValueTransformer+ISO8601.h"));
- supportingFiles.add(new SupportingFile("Configuration-body.mustache", coreFileFolder(), classPrefix + "Configuration.m"));
- supportingFiles.add(new SupportingFile("Configuration-header.mustache", coreFileFolder(), classPrefix + "Configuration.h"));
+ supportingFiles.add(new SupportingFile("Configuration-protocol.mustache", coreFileFolder(), classPrefix + "Configuration.h"));
+ supportingFiles.add(new SupportingFile("DefaultConfiguration-body.mustache", coreFileFolder(), classPrefix + "DefaultConfiguration.m"));
+ supportingFiles.add(new SupportingFile("DefaultConfiguration-header.mustache", coreFileFolder(), classPrefix + "DefaultConfiguration.h"));
+ supportingFiles.add(new SupportingFile("BasicAuthTokenProvider-header.mustache", coreFileFolder(), classPrefix + "BasicAuthTokenProvider.h"));
+ supportingFiles.add(new SupportingFile("BasicAuthTokenProvider-body.mustache", coreFileFolder(), classPrefix + "BasicAuthTokenProvider.m"));
supportingFiles.add(new SupportingFile("api-protocol.mustache", coreFileFolder(), classPrefix + "Api.h"));
supportingFiles.add(new SupportingFile("podspec.mustache", "", podName + ".podspec"));
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TizenClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TizenClientCodegen.java
index 3327972665d..3928a9316be 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TizenClientCodegen.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TizenClientCodegen.java
@@ -25,17 +25,15 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import org.apache.commons.lang3.StringUtils;
public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig {
- protected static String PREFIX = "Sami";
- protected Set foundationClasses = new HashSet();
- protected String sourceFolder = "client";
- protected Map namespaces = new HashMap();
+ protected static String PREFIX = "ArtikCloud";
+ protected String sourceFolder = "src";
+ protected String documentationFolder = "doc";
public TizenClientCodegen() {
super();
- outputFolder = "generated-code/tizen";
+ outputFolder = "";
modelTemplateFiles.put("model-header.mustache", ".h");
modelTemplateFiles.put("model-body.mustache", ".cpp");
apiTemplateFiles.put("api-header.mustache", ".h");
@@ -47,70 +45,71 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig
Arrays.asList(
"bool",
"int",
- "long")
+ "long long",
+ "double",
+ "float")
+ );
+ languageSpecificPrimitives = new HashSet(
+ Arrays.asList(
+ "bool",
+ "int",
+ "long long",
+ "double",
+ "float",
+ "std::string")
);
- languageSpecificPrimitives = new HashSet();
additionalProperties().put("prefix", PREFIX);
setReservedWordsLowerCase(
- // VERIFY
Arrays.asList(
- "void", "char", "short", "int", "void", "char", "short", "int",
- "long", "float", "double", "signed", "unsigned", "id", "const",
- "volatile", "in", "out", "inout", "bycopy", "byref", "oneway",
- "self", "super"
+ "alignas", "alignof", "and", "and_eq", "asm", "atomic_cancel", "atomic_commit", "atomic_noexcept",
+ "auto", "bitand", "bitor", "bool", "break", "case", "catch", "char", "char16_t", "char32_t",
+ "class", "compl", "concept", "const", "constexpr", "const_cast", "continue", "decltype", "default",
+ "delete", "do", "double", "dynamic_cast", "else", "enum", "explicit", "export", "extern", "false",
+ "float", "for", "friend", "goto", "if", "inline", "int", "import", "long", "module", "mutable",
+ "namespace", "new", "noexcept", "not", "not_eq", "nullptr", "operator", "or", "or_eq", "private",
+ "protected", "public", "register", "reinterpret_cast", "requires", "return", "short", "signed",
+ "sizeof", "static", "static_assert", "static_cast", "struct", "switch", "synchronized", "template",
+ "this", "thread_local", "throw", "true", "try", "typedef", "typeid", "typename", "union",
+ "unsigned", "using", "virtual", "void", "volatile", "wchar_t", "while", "xor", "xor_eq"
));
super.typeMapping = new HashMap();
- typeMapping.put("Date", "DateTime");
- typeMapping.put("DateTime", "DateTime");
- typeMapping.put("string", "String");
- typeMapping.put("integer", "Integer");
- typeMapping.put("float", "Float");
- typeMapping.put("long", "Long");
- typeMapping.put("boolean", "Boolean");
- typeMapping.put("double", "Double");
- typeMapping.put("array", "IList");
- typeMapping.put("map", "HashMap");
- typeMapping.put("number", "Long");
- typeMapping.put("object", PREFIX + "Object");
- //TODO binary should be mapped to byte array
- // mapped to String as a workaround
- typeMapping.put("binary", "String");
+ //typeMapping.put("Date", "DateTime");
+ //typeMapping.put("DateTime", "DateTime");
+ typeMapping.put("string", "std::string");
+ typeMapping.put("integer", "int");
+ typeMapping.put("float", "float");
+ typeMapping.put("long", "long long");
+ typeMapping.put("boolean", "bool");
+ typeMapping.put("double", "double");
+ typeMapping.put("array", "std::list");
+ typeMapping.put("map", "std::map");
+ typeMapping.put("number", "long long");
+ typeMapping.put("object", "std::string");
+ typeMapping.put("binary", "std::string");
+ typeMapping.put("password", "std::string");
+ //TODO:Maybe use better formats for dateTime?
+ typeMapping.put("file", "std::string");
+ typeMapping.put("DateTime", "std::string");
+ typeMapping.put("Date", "std::string");
importMapping = new HashMap();
- namespaces = new HashMap();
- namespaces.put("DateTime", "Tizen::Base::DateTime");
- namespaces.put("Integer", "Tizen::Base::Integer");
- namespaces.put("Long", "Tizen::Base::Long");
- namespaces.put("Boolean", "Tizen::Base::Boolean");
- namespaces.put("Float", "Tizen::Base::Float");
- namespaces.put("String", "Tizen::Base::String");
- namespaces.put("Double", "Tizen::Base::Double");
- namespaces.put("IList", "Tizen::Base::Collection::IList");
- namespaces.put("HashMap", "Tizen::Base::Collection::HashMap");
- namespaces.put("ArrayList", "Tizen::Base::Collection::ArrayList");
- namespaces.put("JsonNumber", "Tizen::Web::Json");
- namespaces.put("JsonString", "Tizen::Web::Json");
-
- foundationClasses = new HashSet(
- Arrays.asList(
- "String",
- "Integer",
- "Float")
- );
supportingFiles.clear();
- supportingFiles.add(new SupportingFile("modelFactory.mustache", sourceFolder, PREFIX + "ModelFactory.h"));
- supportingFiles.add(new SupportingFile("helpers-header.mustache", sourceFolder, PREFIX + "Helpers.h"));
- supportingFiles.add(new SupportingFile("helpers-body.mustache", sourceFolder, PREFIX + "Helpers.cpp"));
- supportingFiles.add(new SupportingFile("apiclient-header.mustache", sourceFolder, PREFIX + "ApiClient.h"));
- supportingFiles.add(new SupportingFile("apiclient-body.mustache", sourceFolder, PREFIX + "ApiClient.cpp"));
- supportingFiles.add(new SupportingFile("object.mustache", sourceFolder, PREFIX + "Object.h"));
- supportingFiles.add(new SupportingFile("error-header.mustache", sourceFolder, PREFIX + "Error.h"));
- supportingFiles.add(new SupportingFile("error-body.mustache", sourceFolder, PREFIX + "Error.cpp"));
+ supportingFiles.add(new SupportingFile("helpers-header.mustache", sourceFolder, "Helpers.h"));
+ supportingFiles.add(new SupportingFile("helpers-body.mustache", sourceFolder, "Helpers.cpp"));
+ supportingFiles.add(new SupportingFile("netclient-header.mustache", sourceFolder, "NetClient.h"));
+ supportingFiles.add(new SupportingFile("netclient-body.mustache", sourceFolder, "NetClient.cpp"));
+ supportingFiles.add(new SupportingFile("object.mustache", sourceFolder, "Object.h"));
+ supportingFiles.add(new SupportingFile("requestinfo.mustache", sourceFolder, "RequestInfo.h"));
+ supportingFiles.add(new SupportingFile("error-header.mustache", sourceFolder, "Error.h"));
+ supportingFiles.add(new SupportingFile("error-body.mustache", sourceFolder, "Error.cpp"));
+ supportingFiles.add(new SupportingFile("Doxyfile.mustache", documentationFolder, "Doxyfile"));
+ supportingFiles.add(new SupportingFile("generateDocumentation.mustache", documentationFolder, "generateDocumentation.sh"));
+ supportingFiles.add(new SupportingFile("doc-readme.mustache", documentationFolder, "README.md"));
}
@Override
@@ -141,10 +140,10 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig
@Override
public String getTypeDeclaration(String name) {
- if (languageSpecificPrimitives.contains(name) && !foundationClasses.contains(name)) {
+ if (languageSpecificPrimitives.contains(name)) {
return name;
} else {
- return name + "*";
+ return name + "";
}
}
@@ -154,7 +153,7 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig
String type = null;
if (typeMapping.containsKey(swaggerType)) {
type = typeMapping.get(swaggerType);
- if (languageSpecificPrimitives.contains(type) && !foundationClasses.contains(type)) {
+ if (languageSpecificPrimitives.contains(type)) {
return toModelName(type);
}
} else {
@@ -166,10 +165,10 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig
@Override
public String getTypeDeclaration(Property p) {
String swaggerType = getSwaggerType(p);
- if (languageSpecificPrimitives.contains(swaggerType) && !foundationClasses.contains(swaggerType)) {
+ if (languageSpecificPrimitives.contains(swaggerType)) {
return toModelName(swaggerType);
} else {
- return swaggerType + "*";
+ return swaggerType + "";
}
}
@@ -177,48 +176,48 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig
public String toModelName(String type) {
if (typeMapping.keySet().contains(type) ||
typeMapping.values().contains(type) ||
- foundationClasses.contains(type) ||
importMapping.values().contains(type) ||
defaultIncludes.contains(type) ||
languageSpecificPrimitives.contains(type)) {
return type;
} else {
- return PREFIX + Character.toUpperCase(type.charAt(0)) + type.substring(1);
+ return Character.toUpperCase(type.charAt(0)) + type.substring(1);
}
}
@Override
public String toModelImport(String name) {
- if (namespaces.containsKey(name)) {
- return "using " + namespaces.get(name) + ";";
+ if (name.equals("std::string")) {
+ return "#include ";
+ } else if (name.equals("std::map")) {
+ return "#include