1- From 98b3f154d75089db8525340286ecf1887bf5cfce Mon Sep 17 00:00:00 2001
1+ From 6ebbd5b6f0271d1f2bfff20ace78d5a53b5cc450 Mon Sep 17 00:00:00 2001
22From: Alexandre Krispin <
[email protected] >
33Date: Thu, 26 Jan 2023 15:44:12 +0900
44Subject: [PATCH] Customize templates
55
66---
77 .../io/swagger/codegen/CodegenConstants.java | 3 ++
8+ .../io/swagger/codegen/DefaultCodegen.java | 1 +
89 .../languages/PythonClientCodegen.java | 37 +++++++++++++++++--
910 .../src/main/resources/python/README.mustache | 16 ++++++--
1011 .../main/resources/python/api_doc.mustache | 24 +++++++++---
1112 .../main/resources/python/model_doc.mustache | 13 +++++--
12- 5 files changed, 77 insertions(+), 16 deletions(-)
13+ 6 files changed, 78 insertions(+), 16 deletions(-)
1314
1415diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java
1516index d04e606ff..bf1714280 100644
@@ -25,6 +26,18 @@ index d04e606ff..bf1714280 100644
2526 public static final String GIT_USER_ID = "gitUserId";
2627 public static final String GIT_USER_ID_DESC = "Git user ID, e.g. swagger-api.";
2728
29+ diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
30+ index 637fb68e7..0c30e0fcb 100644
31+ --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
32+ +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
33+ @@ -2631,6 +2631,7 @@ public class DefaultCodegen {
34+ p.baseType = pr.datatype;
35+ p.isContainer = true;
36+ p.isListContainer = true;
37+ + p.isPrimitiveType = pr.isPrimitiveType;
38+
39+ // recursively add import
40+ while (pr != null) {
2841diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java
2942index 9ef2e69e0..c5079eac1 100755
3043--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java
0 commit comments