mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
Python /python3 datetime and date fixed
This commit is contained in:
parent
aba755d3de
commit
20c7932df4
@ -33,6 +33,7 @@ public class Python3ClientCodegen extends DefaultCodegen implements CodegenConfi
|
|||||||
languageSpecificPrimitives.add("bool");
|
languageSpecificPrimitives.add("bool");
|
||||||
languageSpecificPrimitives.add("str");
|
languageSpecificPrimitives.add("str");
|
||||||
languageSpecificPrimitives.add("datetime");
|
languageSpecificPrimitives.add("datetime");
|
||||||
|
languageSpecificPrimitives.add("date");
|
||||||
|
|
||||||
typeMapping.clear();
|
typeMapping.clear();
|
||||||
typeMapping.put("integer", "int");
|
typeMapping.put("integer", "int");
|
||||||
@ -43,7 +44,8 @@ public class Python3ClientCodegen extends DefaultCodegen implements CodegenConfi
|
|||||||
typeMapping.put("map", "map");
|
typeMapping.put("map", "map");
|
||||||
typeMapping.put("boolean", "bool");
|
typeMapping.put("boolean", "bool");
|
||||||
typeMapping.put("string", "str");
|
typeMapping.put("string", "str");
|
||||||
typeMapping.put("date", "datetime");
|
typeMapping.put("date", "date");
|
||||||
|
typeMapping.put("DateTime", "datetime");
|
||||||
|
|
||||||
// from https://docs.python.org/release/2.5.4/ref/keywords.html
|
// from https://docs.python.org/release/2.5.4/ref/keywords.html
|
||||||
reservedWords = new HashSet<String>(
|
reservedWords = new HashSet<String>(
|
||||||
|
@ -34,6 +34,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
languageSpecificPrimitives.add("bool");
|
languageSpecificPrimitives.add("bool");
|
||||||
languageSpecificPrimitives.add("str");
|
languageSpecificPrimitives.add("str");
|
||||||
languageSpecificPrimitives.add("datetime");
|
languageSpecificPrimitives.add("datetime");
|
||||||
|
languageSpecificPrimitives.add("date");
|
||||||
|
|
||||||
typeMapping.clear();
|
typeMapping.clear();
|
||||||
typeMapping.put("integer", "int");
|
typeMapping.put("integer", "int");
|
||||||
@ -44,7 +45,8 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
typeMapping.put("map", "dict");
|
typeMapping.put("map", "dict");
|
||||||
typeMapping.put("boolean", "bool");
|
typeMapping.put("boolean", "bool");
|
||||||
typeMapping.put("string", "str");
|
typeMapping.put("string", "str");
|
||||||
typeMapping.put("date", "datetime");
|
typeMapping.put("date", "date");
|
||||||
|
typeMapping.put("DateTime", "datetime");
|
||||||
typeMapping.put("object", "object");
|
typeMapping.put("object", "object");
|
||||||
|
|
||||||
// from https://docs.python.org/release/2.5.4/ref/keywords.html
|
// from https://docs.python.org/release/2.5.4/ref/keywords.html
|
||||||
|
Loading…
Reference in New Issue
Block a user