File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
templates/swift/Sources/Models Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
{% macro sub_schema(property ) %}{% if property .sub_schema %}{% if property .type == ' array' %}[{{property .sub_schema | caseUcfirst }}]{% else %}{{property .sub_schema | caseUcfirst }}{% endif %}{% else %}{% if property .type == ' object' and property .additionalProperties %}[String : Any]{% else %}{{property | typeName }}{% endif %}{% endif %}{% endmacro %}
2
2
3
3
/// {{ definition .description }}
4
+ {% if definition .properties | length == 0 and not definition .additionalProperties %}
5
+ public class {{ definition .name | caseUcfirst }} {}
6
+ {% else %}
4
7
public class {{ definition .name | caseUcfirst }} {
5
8
6
9
{% for property in definition .properties %}
@@ -72,4 +75,5 @@ public class {{ definition.name | caseUcfirst }} {
72
75
{% endif %}
73
76
{% endfor %}
74
77
75
- }
78
+ }
79
+ {% endif %}
You can’t perform that action at this time.
0 commit comments