mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-23 23:49:08 +00:00
Better tests for string (number) (#3953)
* beter test for string (number) * fix mapping * fix mapping in csharp generators
This commit is contained in:
@@ -1068,8 +1068,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
typeMapping.put("file", "File");
|
||||
typeMapping.put("UUID", "UUID");
|
||||
typeMapping.put("URI", "URI");
|
||||
typeMapping.put("BigDecimal", "BigDecimal"); //TODO need the mapping?
|
||||
|
||||
typeMapping.put("BigDecimal", "BigDecimal");
|
||||
|
||||
instantiationTypes = new HashMap<String, String>();
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
typeMapping.put("long", "long?");
|
||||
typeMapping.put("double", "double?");
|
||||
typeMapping.put("number", "decimal?");
|
||||
typeMapping.put("BigDecimal", "decimal?");
|
||||
typeMapping.put("DateTime", "DateTime?");
|
||||
typeMapping.put("date", "DateTime?");
|
||||
typeMapping.put("file", "System.IO.Stream");
|
||||
|
||||
@@ -96,6 +96,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
||||
typeMapping.put("number", "float32");
|
||||
typeMapping.put("float", "float32");
|
||||
typeMapping.put("double", "float64");
|
||||
typeMapping.put("BigDecimal", "float64");
|
||||
typeMapping.put("boolean", "bool");
|
||||
typeMapping.put("string", "string");
|
||||
typeMapping.put("UUID", "string");
|
||||
|
||||
@@ -95,6 +95,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
typeMapping.put("long", "long");
|
||||
typeMapping.put("double", "double");
|
||||
typeMapping.put("number", "decimal");
|
||||
typeMapping.put("BigDecimal", "decimal");
|
||||
typeMapping.put("DateTime", "DateTime");
|
||||
typeMapping.put("date", "DateTime");
|
||||
typeMapping.put("UUID", "Guid");
|
||||
|
||||
@@ -94,6 +94,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
|
||||
typeMapping.put("long", "long");
|
||||
typeMapping.put("double", "double");
|
||||
typeMapping.put("number", "decimal");
|
||||
typeMapping.put("BigDecimal", "decimal");
|
||||
typeMapping.put("DateTime", "DateTime");
|
||||
typeMapping.put("date", "DateTime");
|
||||
typeMapping.put("file", "System.IO.Stream");
|
||||
|
||||
@@ -222,6 +222,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC
|
||||
typeMapping.put("float", "Float");
|
||||
typeMapping.put("double", "Double");
|
||||
typeMapping.put("number", "Double");
|
||||
typeMapping.put("BigDecimal", "Double");
|
||||
typeMapping.put("integer", "Int");
|
||||
typeMapping.put("file", "FilePath");
|
||||
// lib
|
||||
|
||||
@@ -171,6 +171,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
|
||||
typeMapping.put("file", "FilePath");
|
||||
typeMapping.put("binary", "FilePath");
|
||||
typeMapping.put("number", "Double");
|
||||
typeMapping.put("BigDecimal", "Double");
|
||||
typeMapping.put("any", "Value");
|
||||
typeMapping.put("UUID", "UUID");
|
||||
typeMapping.put("URI", "Text");
|
||||
|
||||
@@ -144,6 +144,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
|
||||
typeMapping.put("int", "Number");
|
||||
typeMapping.put("float", "Number");
|
||||
typeMapping.put("number", "Number");
|
||||
typeMapping.put("BigDecimal", "Number");
|
||||
typeMapping.put("DateTime", "Date");
|
||||
typeMapping.put("date", "Date");
|
||||
typeMapping.put("long", "Number");
|
||||
|
||||
Reference in New Issue
Block a user