Skip to content

Commit 260e1a6

Browse files
committed
Fix Kotlin models with no properties
1 parent 310ab72 commit 260e1a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

templates/kotlin/src/main/kotlin/io/appwrite/models/Model.kt.twig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import com.google.gson.annotations.SerializedName
66
/**
77
* {{ definition.description }}
88
*/
9+
{% if definition.properties | length == 0 %}
10+
class {{ definition.name | caseUcfirst }} {}
11+
{% else %}
912
data class {{ definition.name | caseUcfirst }}(
1013
{% for property in definition.properties %}
1114
/**
@@ -59,4 +62,5 @@ data class {{ definition.name | caseUcfirst }}(
5962
{% endfor %}
6063
{% endif %}
6164
{% endfor %}
62-
}
65+
}
66+
{% endif %}

0 commit comments

Comments
 (0)