File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
templates/cli/lib/type-generation/languages Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ use Appwrite\\Models\\<%- toPascalCase(attribute.relatedCollection) %>;
55
55
< % if (attribute . format === ' enum' ) { -% >
56
56
enum < %- toPascalCase(attribute . key ) % > {
57
57
< % for (const [index , element ] of Object . entries(attribute . elements )) { -% >
58
- case < %- element . toUpperCase( ) % > = ' <%- element %>' ;
58
+ case < %- toUpperSnakeCase( element ) % > = ' <%- element %>' ;
59
59
< % } -% >
60
60
}
61
61
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ class Swift extends LanguageMeta {
48
48
<% if (attribute.format === ' enum' ) { -%>
49
49
public enum <% - toPascalCase(attribute.key) %> : String, Codable, CaseIterable {
50
50
<% for (const [index, element] of Object .entries(attribute.elements)) { -%>
51
- case <% - element %> = "<% - element %> "
51
+ case <% - toSnakeCase( element) %> = "<% - element %> "
52
52
<% } -%>
53
53
}
54
54
Original file line number Diff line number Diff line change @@ -72,14 +72,14 @@ class TypeScript extends LanguageMeta {
72
72
<% if (attribute.format === ' enum' ) { -%>
73
73
export enum <% - toPascalCase(attribute.key) %> {
74
74
<% for (const [index, element] of Object .entries(attribute.elements)) { -%>
75
- <% - element.toUpperCase( ) %> = "<% - element %> ",
75
+ <% - toUpperSnakeCase(element ) %> = "<% - element %> ",
76
76
<% } -%>
77
77
}
78
78
79
79
<% } -%>
80
80
<% } -%>
81
81
<% } -%>
82
- <% for (const collection of collections) { %>
82
+ <% for (const collection of collections) { - %>
83
83
export type <% - toPascalCase(collection.name) %> = Models.Document & {
84
84
<% for (const attribute of collection.attributes) { -%>
85
85
<% - toCamelCase(attribute.key) %> : <% - getType(attribute) %> ;
You can’t perform that action at this time.
0 commit comments