Skip to content

Commit 1a82d39

Browse files
committed
fix: enum attributes in dart and kotlin
1 parent 6085e9a commit 1a82d39

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/cli/lib/type-generation/languages/dart.js.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import '<%- attribute.relatedCollection.toLowerCase() %>.dart';
5252
<% if (attribute.format === 'enum') { -%>
5353
enum <%- toPascalCase(attribute.key) %> {
5454
<% for (const element of attribute.elements) { -%>
55-
<%- element %>,
55+
<%- toSnakeCase(element) %>,
5656
<% } -%>
5757
}
5858

templates/cli/lib/type-generation/languages/kotlin.js.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import <%- toPascalCase(attribute.relatedCollection) %>
5454
<% if (attribute.format === 'enum') { -%>
5555
enum class <%- toPascalCase(attribute.key) %> {
5656
<% for (const [index, element] of Object.entries(attribute.elements)) { -%>
57-
<%- element %><%- index < attribute.elements.length - 1 ? ',' : '' %>
57+
<%- toUpperSnakeCase(element) %><%- index < attribute.elements.length - 1 ? ',' : '' %>
5858
<% } -%>
5959
}
6060

0 commit comments

Comments
 (0)