|
14 | 14 | [#case "long"] |
15 | 15 | [#case "Long"][#return "long?"] |
16 | 16 | [#case "Void"][#return "RESTVoid"] |
| 17 | + [#case "IdentityType"] |
17 | 18 | [#case "LocalDate"] |
18 | 19 | [#case "Locale"] |
19 | 20 | [#case "URI"] |
|
32 | 33 | [#case "KeyType"][#return "KeyType?"/] |
33 | 34 | [#case "KeyAlgorithm"][#return "KeyAlgorithm?"/] |
34 | 35 | [#default] |
35 | | - [#if type?starts_with("Collection")] |
36 | | - [#return type?replace("Collection", "List")?replace("UUID", "string")/] |
| 36 | + [#if type?starts_with("Collection") || type?starts_with("List")] |
| 37 | + [#return type?replace("Collection", "List")?replace("UUID", "string")?replace("String", "string")/] |
37 | 38 | [#else] |
38 | 39 | [#return type/] |
39 | 40 | [/#if] |
|
51 | 52 | [#return "int64"/] |
52 | 53 | [#elseif type == "Void"] |
53 | 54 | [#return "nil"/] |
54 | | - [#elseif type?starts_with("Collection")] |
55 | | - [#return type?replace("Collection", "[]")?replace("UUID", "string")?replace("<", "")?replace(">", "")/] |
56 | | - [#elseif type == "String" || type = "UUID" || type == "ZoneId" || type == "URI" || type == "Locale" || type == "LocalDate" || type == "char" ] |
| 55 | + [#elseif type?starts_with("Collection<") || type?starts_with("List<")] |
| 56 | + [#return type?replace("Collection", "[]")?replace("List", "[]")?replace("UUID", "string")?replace("<", "")?replace(">", "")?replace("String", "string")/] |
| 57 | + [#elseif type == "String" || type = "UUID" || type == "ZoneId" || type == "URI" || type == "Locale" || type == "LocalDate" || type == "char" || type == "IdentityType" ] |
57 | 58 | [#return "string"/] |
58 | 59 | [#elseif type == "Object" || type == "D" || type == "T"] |
59 | 60 | [#return "interface{}"/] |
|
96 | 97 | [#case "JWT"][#return "JWT | object"/] |
97 | 98 | [#case "Void"][#return "void"/] |
98 | 99 | [#default] |
99 | | - [#if type?starts_with("Collection")] |
| 100 | + [#if type?starts_with("Collection<") || type?starts_with("List<")] |
100 | 101 | [#return type?replace("Collection", "Array")?replace("UUID", "string")/] |
101 | 102 | [#else] |
102 | 103 | [#return type/] |
|
131 | 132 | [#case "Object"][#return "any"/] |
132 | 133 | [#case "Void"][#return "void"/] |
133 | 134 | [#default] |
134 | | - [#if type?starts_with("Collection")] |
135 | | - [#return type?replace("Collection", "Array")?replace("UUID", "string")/] |
| 135 | + [#if type?starts_with("Collection<") || type?starts_with("List<")] |
| 136 | + [#return type?replace("Collection", "Array")?replace("List", "Array")?replace("UUID", "string")/] |
136 | 137 | [#else] |
137 | 138 | [#return type/] |
138 | 139 | [/#if] |
|
154 | 155 | [#elseif language == "ruby"] |
155 | 156 | [#if type == "UUID" || type == "String" || type == "IdentityProviderType" || type == "LambdaType"] |
156 | 157 | [#return "string"/] |
157 | | - [#elseif type?starts_with("Collection")] |
| 158 | + [#elseif type?starts_with("Collection<") || type?starts_with("List<")] |
158 | 159 | [#return "Array"/] |
159 | 160 | [#elseif type == "boolean" || type == "Boolean"] |
160 | 161 | [#return "Boolean"/] |
|
0 commit comments